exporting variables from shell script to awk -
I am exporting the variable from the shell script into an EXC. Program is below
export name = "hi" eval $ (awk '{element = "bye"; name = element "name"; print name}' 'resonant $ name What is my approximate output, I need to insert name with element inside AVC script and then display consistent results out and therefore my output will be
name = byehi < / P>
But I can not find the same. Can you please please PPP please help me about this
You can specify variables with no-v option without having to export anything to the environment. For example:
name = 'high' name = $ (awk -v name = "$ name" 'BEGIN {print' bye name} ') "$ name" echo This will return byehi as expected.
Comments
Post a Comment