Pass $ENV to awk

It's not possible to use env variable in awk but we can pass them like this.

export VAR=test echo | awk -v env_var="$VAR" '{print "The value of VAR is " env_var}' > The value of VAR is test

Stay up to date

Sign up for the mailing list and get notified via email when new blog posts come out.