Hi guys. Can somone advise as to what the problem is with the following sed command?
1) read -p "Please enter new username you wish to replace old: " new_username
sed "s/$username/$new_username/" information_file
;;
This is one of the case statements included but I'm having trouble with this one. All I want it to do is replace any occurence of a given username in information_file.txt with a new username provided by user. My sed command either does nothing to it or just appends the new username on every line as well as next to the current username.
Many thanks!
P.S. $username has been prompted above the case statement so I doubt that's the problem