sed 's/abcd/$variable/g' abcd_calls > $variable_calls
This is the statement i am trying which has 2 errors in it.
1st- sed 's/abcd/$variable/g' is changing abcd to $variable in the file abcd_calls ,I want it to convert abcd into the string value given by user through read command, taking input is not an issue but converting abcd into that input is the issue. how can i do this?
2nd- abcd_calls > $variable_calls
I know that if we place any string in place of $variable in the above statement, it will redirect output to it and also create the file if it does not exist, what i wanted to do is to redirect output to the file after creating it with user given input. Is it possible ?