In my bash script i want to execute command that will find lines in a file that starts with a keyword which is stored in a variable like this:
keyword="key"
result=(`cat path/to/my/file | grep '^$keyword'`)
|
In my bash script i want to execute command that will find lines in a file that starts with a keyword which is stored in a variable like this:
| |||||||||
feedback
|
|
Single quotes inhibit substitution. Use double quotes instead:
| |||
|
feedback
|
|
Forgive me please, i figured it all out as soon as i posted my question: If has simular issue:
| |||||
feedback
|