In a simple menu script I want to capture the input from the user with "read" and use it as a value in a variable Rempages="some_value" which is in a different script file.
So I have to perform a search and replace for this variable and only replace its value.
How can that be done?
The only part that bothers me is the Search and replace the value of the variable. I can use sed to find and replace a matching string but I need to change a value that can be anything between 0 and 99 ( Rempages="number between 0 and 99" ) and I do not know how to make sed do a search of something that can be different every time.
Yes something like that,
only that withsomething can be different as it is a value from the last input....
So it has to look for a way to identify and replace it