Quantcast
Channel: Passing a second variable to gawk in this Bash shell script is failing - Unix & Linux Stack Exchange
Browsing all 4 articles
Browse latest View live

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 Article



passing 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 Article

Answer 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 Article

Passing 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
Browsing all 4 articles
Browse latest View live




Latest Images