Search Results

Search: Posts Made By: cool_boss2121
28,617
Posted By cool_boss2121
yep got it !! just replaced the single quotes...
yep got it !!
just replaced the single quotes with double quotes and its all done !!

now it looks like -

sed "/war of worlds/{n;s/^/$3,/;}" file1


Thank you all !!

:-)
28,617
Posted By cool_boss2121
Thank you everybody.. I tried all of them and...
Thank you everybody.. I tried all of them and they all work.. but the one by Ygor suits me best !! :-)

Thank you !

However, in this line -

sed '/war of worlds/{n;s/^/100,/;}' file1

the...
28,617
Posted By cool_boss2121
Thank you for that quick answer.. I tried it...
Thank you for that quick answer.. I tried it out..

and I got the line number as-

linenum=`cat $ROOT/$1/$2 | grep -n "war of worlds:"|cut -d: -f1`;
echo $linenum;
linen=`expr $linenum + 1`;...
28,617
Posted By cool_boss2121
reading specific line from file
Hi all...

I not a expert unix script programmer, Kindly adjust.

My requirement is that, i have a file which contains the about 10 lines -
say

1
2
3
...
8 war of the worlds: => text...
Showing results 1 to 4 of 4

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