Search Results

Search: Posts Made By: scigeek
1,102
Posted By Chubler_XL
Yes there is: sed '4,$s/^/ /' infile >...
Yes there is:
sed '4,$s/^/ /' infile > outfile
1,598
Posted By vgersh99
nawk -v s='$V1$nbr' '$1 == s {f=1;print;next} f...
nawk -v s='$V1$nbr' '$1 == s {f=1;print;next} f {print;f=0}' myFile
or
nawk -v s='$V1$nbr' '$1 == s {f=2} --f>=0' myFile
1,598
Posted By Corona688
awk '/[$]V1[$]nbr/ { print ; getline ; print }'...
awk '/[$]V1[$]nbr/ { print ; getline ; print }' datafile
1,049
Posted By bartus11
Try: awk 'NR==1{for (i=1;i<=NF;i++) if...
Try: awk 'NR==1{for (i=1;i<=NF;i++) if ($i~"_CTRL") a[i]=1}{for (i=1;i<=NF;i++) if (i in a) printf $i" ";printf "\n"}' file > new_file
278,577
Posted By Neo
Simple rules of the UNIX.COM forums:
RULES OF THE UNIX AND LINUX FORUMS

For the latest version of the community rules (the official community rules page), please visit here. (https://www.unix.com/misc.php?do=cfrules)


No flames,...
Showing results 1 to 5 of 5

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