Paul Wilkins wrote:
anton wrote:

The purpose of this is to cat the actual text of all the files in the directory that don't end in .dat into a new file.
So far I have:
ls | grep -v "\.dat$" | cat > newfile
but cat just gives me the list of files again. Any way to force cat to consider the lines as files? Or a better way of doing this?


I'm not in Linux right now, but what happens when you redirect the output straight to a file.

ls | grep -v "\.dat$" > newfile


Exactly the same as above. Cat just takes what it gets from stdin and pipes it to stdout, so we get exactly the same...
Cheres
Anton
-=-=-
... I don't drink, I don't like it, it makes me feel too good.
-- K. Coates

Reply via email to