[GLLUG] why doesn't this work?

Mike Rambo mrambo at lsd.k12.mi.us
Fri Oct 24 12:32:48 EDT 2003


On Thu, 2003-10-23 at 18:12, Marshal Newrock wrote:
> That is indeed puzzling.  I can think of two possible things: 1) that
> the files are symlinks to other files, which are missing, or 2) that
> the filenames contain non-printable characters.  See what 'ls -lQ'
> says.

Nope they are just plain files. ls -lQ displays the same names except in
double quote marks. Turns out the easy would have been to just

cat *.mysql >> makeAll

which does work fine. Still leaves me wondering why the other doesn't
though cuz it seems like it should.


> On Thu, 23 Oct 2003, Mike Rambo wrote:
> 
> > I'm trying to combine the text of all files in a directory into one
> > large file with the one liner:
> >
> > for TARGET in `ls | awk {'print $9'}`; do cat $TARGET >> makeAll.mysql;
> > done;
> >
> > but all I get is:
> >
> > cat: building.mysql: No such file or directory
> > cat: dept.mysql: No such file or directory
> > cat: equipment.mysql: No such file or directory
> > cat: guest.mysql: No such file or directory
> > cat: inventory.mysql: No such file or directory
> > cat: itech.mysql: No such file or directory
> > cat: itstaff.mysql: No such file or directory
> > cat: partused.mysql: No such file or directory
> > cat: repair.mysql: No such file or directory
> > cat: vardat.mysql: No such file or directory
> >
> > The $TARGET variable clearly contains all the filenames in the directory
> > but the cat command for some reason can't find them in this context.
> > What have I missed?
> 
> -- 
> 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