I have a script like this#!/bin/kshecho Enter the matching patternread patternpath= /home/siva/echo Navigating to $pathcd $pathcat filename|awk '/$pattern/ {for (i=1; i<=10; i++) {getline;print}}'i am not able to get the entered $pattern when i execute the script.
How to use a variable inside an awk statement?
awk;scripting