How can I add a variable within awk command? below is my command:
cat /home/ubuntu/test/copy.txt | awk 'NR==21{print ".host = "$line";"}1' $line is basically an IP address which is retrieved from a text file. With the above command the output looks like
.host = ; Any immediate help would be really appreciated.
Format of copy.txt
backend default { #.host = value; need to be here .port = "8080"; }
linevariable from file or from other source?copy.txtfile?