From: Neeraj Lal (neeraj_lal@fastmail.us)
Date: Wed May 19 2004 - 12:36:00 EDT
Original Question :
A quick scripting question
I have a file with file names delimeted by : like
abc.txt:efg.txt:hij.txt
now I want to make a new file using the above file
abc.txt
efg.txt
hij.txt
How can we do the same
SUMMARY :
Thanks to all of you who replied The following worked for me
awk -F, '{for (i=1;i<=NF;i++) printf "%s\n",$i}' <file1
> file2
and
cat file1 | tr "," "\n" > file2
Thanks
Neeraj Lal
-- http://www.fastmail.fm - Does exactly what it says on the tin -- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:41 EDT