Search Results

Search: Posts Made By: schureki
1,096
Posted By dude2cool
awk '{if ($0 ~ "Port Index:"){a=$3} else {a=""}}...
awk '{if ($0 ~ "Port Index:"){a=$3} else {a=""}} \
{if ($0 ~ "Permanent Port") {b=$0;}} \
{if( $0 ~ "NodeSymb:"){gsub(/"/,"",$7);c=$7}} \
{if (a != "")print "Port:", a, b, c}' /tmp/<your-filename>...
1,096
Posted By ahamed101
Try this... awk '{ /Port Index/ &&...
Try this...

awk '{
/Port Index/ && port[++j]=$NF
/Permanent Port Name/ && name[j]=$NF
/NodeSymb/ && node[j]=$NF
}
END{
for(i=1;i<=j;i++)
...
1,566
Posted By ctsgnb
You can for example replace the grep name...
You can for example replace the grep name Input_file
with
grep -E "^Perm|^Addr Index" Input_file
or
egrep -e "name|Index" Input_file

echo "Permanent name: Addr name:\n===============...
Showing results 1 to 3 of 3

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