I must have forgot how to do this, but, I am attempting to enter a variable into an awk / gawk search pattern.
I am getting a value from user input to place in a specific section of a 132 character string.
my default command is ....
gawk --re-interval '/^([ST].{3}P .{4}CYA.{8}1)/' ${Arch_Dir}/${CYCLE}/${SUB_NAME} | wc -l
The above command does return information as expected, but ... the
"CY"
characters are the two I want to substitute based on user input.
gawk -v val="$VAL" --re-interval .....
I have attempted to pass in my value via "-v", but I must have the syntax wrong.
Any help would be greatly appreciated!
Stu