I want to use the read command in order to input a keyword from the keyboard.
I then want to use this keyword in a grep command.
How to I input a phrase as a keyword? For example if I use
read keyword
"today is"
and then use grep, I get "No such file or directory" error.
Be sure to use double quotes around the variable reference, then it should work correctly. Also it is to best use the -r option so that backslashes are not interpreted by the read command, for example: