I am trying a script where i awk the output text file to a csv file
Attached are the input file , I am a newbie at bash scripting
Input Text file
awk '
/NE name:/ {
n = $4
}
/System Name:/ {
r = $4
}
/System Name: / {
p = $3 $4 $5 $6
print n , r , p
}' OFS=, /cygdrive/c/output/LLDP/output.txt >>$i
Desired CSV output
AA2M3A 172.17.168.226 ER_3898_1_FON Huawei RTN 980
AA2M3A 172.17.168.226 ER_3898_1_FON Huawei RTN 980
ABHM7a 172.17.167.2 HCX16.01 Huawei Versatile Routing Platform Software
ABHM7a 172.17.167.2 HCX16.02 Huawei Versatile Routing Platform Software