Search Results

Search: Posts Made By: sam127
1,592
Posted By bartus11
awk -vRS="tr" 'NR>1{print $3" destination is...
awk -vRS="tr" 'NR>1{print $3" destination is "$(NF-2)}' file
2,059
Posted By dazdseg
have you used the method that i suggested......
have you used the method that i suggested... above??
2,059
Posted By radoulov
Assuming the logical records are separated by an...
Assuming the logical records are separated by an empty lines (no spaces or other non-printable characters):

awk '{
print $3, "destination is", $(NF - 2)
}' RS= infile
4,589
Posted By zaxxon
I didn't make it in one awk instruction but...
I didn't make it in one awk instruction but nevertheless:

awk 'NR==1{h=$2} {gsub(/[]AS[]/,"",$4); _[$1]=$4} END{print h; for(a in _){if(f){f=f RS _[a]}else{f=_[a]}}; print f | "sort -n| uniq"}'...
4,589
Posted By methyl
Please post the script which does the...
Please post the script which does the "traceroute" making it clear what Operating System you have and what Shell you are using.

The syntax for "traceroute" and the processing a "traceroute" output...
4,589
Posted By zaxxon
You can remove the square brackets in the same...
You can remove the square brackets in the same awk; added a RS at the end (not sure if needed):

awk 'BEGIN{ORS=" "}{gsub(/[][]/,"",$4); if(NR==1)print $2,$4;else print $4}END{print RS}' infile...
4,589
Posted By rajamadhavan
traceroute X.X.X.X | awk 'BEGIN{ORS="...
traceroute X.X.X.X | awk 'BEGIN{ORS=" "}{if(NR==1)print $2,$4;else print $4;}'


You may pipe a sed command to remove the [ and ] brackets...
Showing results 1 to 7 of 7

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