[GLLUG] why doesn't this work?
Mike Rambo
mrambo at lsd.k12.mi.us
Fri Oct 24 15:06:55 EDT 2003
On Fri, 2003-10-24 at 09:27, Cory Spitz wrote:
> On Fri, 24 Oct 2003, Mike Rambo wrote:
>
> > >
> > > Mike, why not omit awk from the one-liner: for target in `ls -1`; do cat
> > > $target >>makeall.mysql; done?
> > >
> > > "ls -1" returns the one filename per line so you can omit awk. I tried
> > > it this way and I can concatenate all files into a single file. Even
> > > shorter is the standard: cat *.mysql >>makeall.mysql.
> > >
> > > --bong
> > >
> >
> > Well, no. ls -l returns one line but there is much more than just the
> > filename on it.
> >
> > -rw-rw-r-- 1 mrambo mrambo 838 Jan 1 2003 building.mysql
> >
>
> There is a difference between `ls -l` (ell) and `ls -1` (one).
> -Cory
Yes indeed - and I the missed the fact that that bong was using the
number one. But it still only works if I undo my alias of 'ls' to 'ls
-l' and then use 'ls -1'. Not sure why cat sees the filenames
differently with the alias but...
Of course, I like my alias so I'll keep it and use 'dir -1' instead.
Thanks all.
--
Mike Rambo
mrambo at lsd.k12.mi.us
NOTE: In order to control energy costs the light at the end
of the tunnel has been shut off until further notice...
More information about the linux-user
mailing list