Sed problem in a Bash script
- by moata_u
Hello there.
I'm having a problem using the sed command . I'm trying to write a bash script that does the following :
search for the line that contain :@
then save the line that contained :@ and replace it with new line
as in the following:
#! /bin/bash
echo "Please enter the ip address of you file"<br>
read ipnumber<br>
find=`grep ':@' application.properties` # find the line<br>
input="connection.url=jdbc\racle\:thin\:@$ipnumber\:1521\:billz" # preparing new line<br>
echo `sed "s/'${find}'/'${input}'/g" application.properties` # replace old with new line <br>
The problem is: nothing happens.
I've already tried to use "${find}" instead of '${find}'