sed problem ....
Posted
by
moata_u
on Ask Ubuntu
See other posts from Ask Ubuntu
or by moata_u
Published on 2011-03-03T07:29:51Z
Indexed on
2011/03/03
7:32 UTC
Read the original article
Hit count: 163
bash
hello there ...
am facing problem in sed command , i was trying write a bash script that do the following : 1. search for the line that contain :@ , 2.then save the line that contained :@ and replace it with new line ....as following :
! /bin/bash
echo "Please enter the ip address of you file"
read ipnumber
find=grep ':@' application.properties
# find the line
input="connection.url=jdbc\racle\:thin\:@$ipnumber\:1521\:billz" # preparing new line
echo sed "s/'${find}'/'${input}'/g" application.properties
# replace old with new line
**Problem is nothing happen !!!! * I already tried to use "${find}" instead of '${find}'
© Ask Ubuntu or respective owner