Results 1 to 3 of 3
My file.txt contains following:
>> file.txt <<
Code:
line one goes here
line two is here
and so on.......
i want to replace the text in the file "one" with ...
- 11-04-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 5
Dynamic command
My file.txt contains following:
>> file.txt <<
Code:line one goes here line two is here and so on.......
i want to replace the text in the file "one" with "hundred" using a shell script. My shell script contains the following command:
>> replaceText.sh<<
I am calling it using:Code:sed -i 's/one/$1/g' file.txt
Instead of replacing "one" with "hundered" the shell script replaces it with $1.Code:./replaceText hundred
How can I get this working?
- 11-05-2010 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
- 11-05-2010 #3Just Joined!
- Join Date
- Oct 2010
- Posts
- 5
That worked
. Thanks


Reply With Quote
