I need to make an interactive bash script where the user will input a word, for example 'xyz' and it will replace a word in a text file.
For example, I have a script called example.sh. When i run it, it should ask:
What is your name?:
and the user will input 'xyz'.
The script should take that input and replace 'username' inside a text file called userlist.txt to 'xyz'
to be more clear, I need user input to run
sed -i -e s/username/userinput/g userlist.txt