Je cherche à faire un truc simpliste sous awk, récupérer 2 champs sur une ligne, un autre sur la suivante et tout afficher.
Mon script awk
(/Device/) {
bec=$1
int=$4
}
(/MAC add/) {print bec,int,$1}
Quand je lance mon script
# awk -f a.awk bl.MAC
syntax error The source line is 3.
The error context is
>>> int= <<< $4
awk: The statement cannot be correctly parsed.
The (…)