Hi,
I would like to parse a fic with awk variable but i have a problem
My FIC :
Test1 1100
Test2 0011
Test3 011A
Test4 BB23
The result that i want :
Test1 1100
A script that work great :
But i want to use a variable like HEXA=11
This not work like i want :
the result is
Test1 1100
Test2 0011
Test3 011A
and i want just : Test1 1100
I would like to filter the 2 first digit with my variable.
I hope my problem is clear ...
Thanks
I would like to parse a fic with awk variable but i have a problem
My FIC :
Test1 1100
Test2 0011
Test3 011A
Test4 BB23
The result that i want :
Test1 1100
A script that work great :
Code:
awk '$2 ~ /^11/ {print $0}'
But i want to use a variable like HEXA=11
This not work like i want :
Code:
awk '$2 ~ var {print $0}' var=$HEXA
the result is
Test1 1100
Test2 0011
Test3 011A
and i want just : Test1 1100
I would like to filter the 2 first digit with my variable.
I hope my problem is clear ...
Thanks