Hello,
Actually i want to replace the word after a matched pattern.
For Ex:
lets say that i am reading a file line by line
while read line
do
echo $line
# i need to search whether a pattern exists in the file and replace the word after if the pattern exist.
# for example : $line=" this is a...
I have a problem in the following code ...
while read line
do
#Get Line Number
OLDLINE=`sed -n $Lineno $filename`
echo "Un Changed Line : "$OLDLINE
echo "Enter a New Pattern : "
read NewPattern <&1
echo "NewPattern :"$NewPattern
NEWLINE=`cat $filename | sed -n $Lineno | sed...
Hello
I got the below one from in one of this forums
For Ex: Loading File System Networking in nature
now i need to extract the patterns between the words File and Networking :
i.e. sample output: System
cmd used : cat <file> | sed 's/.*File //' | sed 's/Closing.*$//'
Actually i have...
Hello All,
Currently i am working on a logic in PERL scripting ...
But i am sort of stuck up, can any one please help.
Here goes.
1. Search for a pattern in a file
2. If the pattern matched lets say 10 lines
2.1 Reterive the first line and check for another pattern
2.1.1 if the second...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.