bash - Grep for values after second pair of brackets -
given file looks this:
0,0: (63736) #f8f8f8 gray(248) 1,0: (63736) #f8f8f8 gray(248) 2,0: (63736) #f8f8f8 gray(248) 3,0: (63736) #f8f8f8 gray(248) 4,0: (63736) #f8f8f8 gray(248) 5,0: (63736) #f8f8f8 gray(248) 6,0: (63736) #f8f8f8 gray(248) 7,0: (63736) #f8f8f8 gray(248) 8,0: (63736) #f8f8f8 gray(248)
going way "799,599:". need number in between gray's parenthesis line starts "590,85:".
the output should be, example if wanted data "7,0:";
248
in sed it'd be:
$ sed -n 's/^7,0:.*(\([^)]*\).*/\1/p' file 248
but keep simple , use awk:
$ awk -f'[()]' '/^7,0:/{print $4}' file 248
Comments
Post a Comment