Answer by Stephen Kitt for passing a second variable to gawk in bash shell...
I suspect there’s whitespace at the start of $RecordSize; quote your variables:echo "$HeaderSize"echo "$RecordSize"./parse.awk -v "headersize=$HeaderSize" -v "recordsize=$RecordSize" < input.list...
View Articlepassing a second variable to gawk in bash shell script failing
I want to pass two variables to my awk script from my shell script.#!/bin/bashHeaderSize=$(grep -n "# end header data" input.list | tr ":" "\n" | head -n 1)RecordSize=$(grep -n "# Number of unique"...
View ArticleAnswer by Stephen Kitt for Passing a second variable to gawk in this Bash...
I suspect there’s whitespace at the start of $RecordSize; quote your variables:echo "$HeaderSize"echo "$RecordSize"./parse.awk -v "headersize=$HeaderSize" -v "recordsize=$RecordSize" < input.list...
View ArticlePassing a second variable to gawk in this Bash shell script is failing
I want to pass two variables to my AWK script from my shell script.#!/bin/bashHeaderSize=$(grep -n "# end header data" input.list | tr ":" "\n" | head -n 1)RecordSize=$(grep -n "# Number of unique"...
View Article
More Pages to Explore .....