I am completely new to sed script. I want to make a script so that it asks user to enter value to be inserted in file. I am not able to find the correct code
so the line I have in the text file looks like this
path =
I want to input path from user so the line looks like:
path = /dev
Through trial and error I only have:
read -p "Enter path name: " PT
echo "$( sed -i '/path/ s/.*/& $PT/' textfile )"
which gives
path = $PT
can you help me with correct code
sed
or are you new to scripting? If the latter please indicate what shell you are using. – Anthon Sep 18 '17 at 16:19