Search Results

Search: Posts Made By: djzah
6,965
Posted By vgersh99
#! /bin/awk -f # awk -f findit.awk...
#! /bin/awk -f
# awk -f findit.awk /home/shared/Configs/.config > output.csv
BEGIN {
OFS=","
qq="\""
}

# FNR is the current record in the current file and increments each time a new...
6,965
Posted By vgersh99
what would be the expected output of this block? ...
what would be the expected output of this block?

interface Vlan229
no ip redirects
ip address 10.47.51.2/24
no ipv6 redirects
ip router ospf 54775 area 0.0.0.44
hsrp 229
...
2,057
Posted By RudiC
OK, try this one:awk 'FNR==NR ...
OK, try this one:awk 'FNR==NR {T[$1]++; next}
/{|}/ {CNT += gsub (/{/,"&") - gsub (/}/,"&")}
/zone/ {for (i in T) if ($0 ~ i) {FN=i".txt"}; gsub...
1,819
Posted By RudiC
Try to ignore comment lines, e.g. by adding sth...
Try to ignore comment lines, e.g. by adding sth like /^\/\//{next} to the top of the awk script.
Showing results 1 to 4 of 4

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