i need to fetch n+9th line from the occurance of a specific word which is store in variable i from a file LIST.txt
Below is the command
Used_pages=`awk '/${i}/{nr[NR+9]}; NR in nr' LIST.txt`
it works when i do a test run on the file by replacing the variable $i with one of the values like
awk '/APPLE/{nr[NR+9]}; NR in nr' LIST.txt
Please help me figgure out how to use the same command with the variable.
Thanks