Re: coupl'a silly questions (and another)


Subject: Re: coupl'a silly questions (and another)
From: Scott Frankel (papi@flaquito)
Date: Sat Aug 25 2001 - 11:38:43 MDT


Under tcsh: alias new 'ls -lt \!* | head'

The trick here (and the source of the failure under bash, as far as
I can tell) is passing an argument to the `ls` command before sending
the results through the pipe. Under tcsh, passing a directory name to
this alias would list the contents of the dir; under bash, the argument
(the dir name) is sent directly through the pipe -- and `head` doesn't
know what to do with a directory name.

So ... anyone know the bash magic to pass an argument from the
commandline. Seems like this should be so clear; but it's still
eluding me. Maybe I *should* change back to tsch ;)

Thanks
Scott

On Saturday 25 August 2001 10:15, Mike Garabedian wrote:
> Scott,
>
> Referring to your first silly question, I actually have the same one...
>
> I think its the same as another alias I used to have on tsch. I can't
> remember the literal, but when I would cd to a directory, it would
> automatically do an ls and show the dir's contents.
>
> Does anyone know how to build that alias? I spent a long time reading the
> bash man page once or twice to no avail...
>
> Thanks
> Mike
>
> > From: Scott Frankel <papi@flaquito>
> > Reply-To: yellowdog-general@lists.yellowdoglinux.com
> > Date: Fri, 24 Aug 2001 18:11:09 -0700
> > To: yellowdog-general@lists.yellowdoglinux.com
> > Subject: coupl'a silly questions
> >
> >
> > What's the bash equivalent of tcsh's \!* sequence?
> > I've grown acustomed to the following alias, and my
> > literal translation returns an error.
> > ls -lt \!* | head
> >
> > How does one logout of an X session without shutting
> > the machine down? (Note, I do NOT use a desktop
> > environment; i.e.: no KDE or Gnome.)
> >
> > Thanks
> > Scott



This archive was generated by hypermail 2a24 : Sat Aug 25 2001 - 10:48:47 MDT