Search Results

Search: Posts Made By: pasricha.kunal
5,761
Posted By pseudocoder
1. I'm not sure but what happens if you use the...
1. I'm not sure but what happens if you use the real filename instead of $2 ?
2. Did you set the newri value before running the command ?
5,761
Posted By pseudocoder
Try sed -ie "s/ri=\"[0-9]*\"/ri=\"$newri\"/"...
Try
sed -ie "s/ri=\"[0-9]*\"/ri=\"$newri\"/" rifile

---------- Post updated at 12:48 ---------- Previous update was at 12:45 ----------

$ newri=111
$ echo...
5,761
Posted By pseudocoder
Maybe this :confused: $ cat rifile rg="333" ...
Maybe this :confused:
$ cat rifile
rg="333"
rh="222"
ri="234"
rj="567"
rk="890"
$ newri=777
$ sed -ie "s/^ri=.*/ri=\"$newri\"/" rifile
$ cat rifile
rg="333"
rh="222"
ri="777"
rj="567"...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 02:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy