Close. Try:
ls | grep -v "\.dat$"
Vik :v)
Cheers Vic,
I just managed to get it with sed too. I'm studying for the LPI, and I've got a LONG way to go!
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?
Cheers
Anton
ps. and sorry to be anal, but you have your reply to set...
-=-=-
... Sleep -- the most beautiful experience in life -- except drink.
-- W.C. Fields
