Search Results

Search: Posts Made By: Pushpraj
2,189
Posted By SriniShoo
awk -F ',' 'NR == 1{for(i=1; i<=NF; i++) a[$i] =...
awk -F ',' 'NR == 1{for(i=1; i<=NF; i++) a[$i] = i; next}
$0 ~ "^" proxy {print $(a[field])}' proxy="main,FRONTEND" field="slim" socat.txt
2,189
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

Try (untested): $0 ~ "^" proxy FS {...
2,189
Posted By SriniShoo
awk -F ',' 'NR == 1{for(i=1; i<=NF; i++) a[$i] =...
awk -F ',' 'NR == 1{for(i=1; i<=NF; i++) a[$i] = i; next}
/^main,FRONTEND/ {print $(a["slim"])}
/^apache2,elb4/ {print $(a["ereq"])}' socat.txt
Showing results 1 to 3 of 3

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