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
ps. http://public.kubsu.ru/oreilly/unix/sedawk/index.htm could be useful.
-- Paul Wilkins
