Search Results

Search: Posts Made By: agathaeleanor
1,568
Posted By rdcwayx
/usr/xpg4/bin/awk '{printf /^[0-9]+\|/||NR==1?RS...
/usr/xpg4/bin/awk '{printf /^[0-9]+\|/||NR==1?RS $0:":::" $0}' input.txt |/usr/xpg4/bin/awk '{for (i=1;i<=NF;i++) if (i!=23) gsub(/:::/,"",$i)}1' FS="|" OFS="|"
2,201
Posted By tukuyomi
Try this:~/unix.com$ awk -F\|...
Try this:~/unix.com$ awk -F\| 'FNR==1{n=NF}NF<n{l=$0;getline;$0=l":::"$0}1' sample sample2

If you want to redirect files in its own output file, try this:
~/unix.com$ awk -F\|...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 11:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy