Jan 14, 2004 #1 ozi403 Technical User Apr 29, 2002 54 TR How can I get the words without "," from the file below? # more clnt minilink11, minilink22, minilink44 orasrv exh3409 I want to get like this : minilink11 minilink22 minilink44 orasrv exh3409 thanks.
How can I get the words without "," from the file below? # more clnt minilink11, minilink22, minilink44 orasrv exh3409 I want to get like this : minilink11 minilink22 minilink44 orasrv exh3409 thanks.
Jan 14, 2004 #2 aigles Technical User Sep 20, 2001 464 FR Try this : awk 'BEGIN {FS=","} {for (field=1; field<=NF; field++) print $field }' clnt Jean Pierre. Upvote 0 Downvote
Try this : awk 'BEGIN {FS=","} {for (field=1; field<=NF; field++) print $field }' clnt Jean Pierre.
Jan 14, 2004 #3 PHV MIS Nov 8, 2002 53,708 FR Have you tried this ? Code: tr ',' '\012' </path/to/input >output Or this: Code: IFS=",$IFS" for word in `cat /path/to/input` do echo $word done>output Hope This Help PH. Upvote 0 Downvote
Have you tried this ? Code: tr ',' '\012' </path/to/input >output Or this: Code: IFS=",$IFS" for word in `cat /path/to/input` do echo $word done>output Hope This Help PH.
Jan 15, 2004 Thread starter #4 ozi403 Technical User Apr 29, 2002 54 TR Thanks friends, all are useful. Upvote 0 Downvote
Jan 15, 2004 #5 Ygor Programmer Feb 21, 2003 623 GB This will replace commas (and any following spaces) with newlines... awk '{gsub(", *","\012"print}' file1 > file2 Upvote 0 Downvote
This will replace commas (and any following spaces) with newlines... awk '{gsub(", *","\012"print}' file1 > file2