I tried extracting this pattern using grep but it did not work.
What I have is a file which has contents like this:
Now what I want to do is to extract all http, https, and file patterns or lines and get rid of IMG, My Yahoo!, Yahoo! News etc. This means my final output should like this:
Doing:
extracts lines containing "http". But I want to extract all the three patterns by somehow nesting grep. I even tried this:
But it did not work. I am using Linux with Bash.
Sample input:
Loading File System
Networking in nature
Closing the System
now i need to extract the patterns between the words File and Closing:
i.e. sample output:
System
Networking in Nature
Thanks in advance !!!!!!!!!!!!!!!!! (6 Replies)
Hi Gurus,
I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
Hi All,
I have a file which looks like this:
Name1;A01
Name2;A01.047
Name3;A01.047.025
Newname1;B01
NewName2;B01.056.32
NewName3;B04.09.43
NewNewName1;C01.03
NewNewName2;C01.034.44As you can see, in the file there is some name and followed by the name is some identifier. These... (5 Replies)
Hello Perl-experts,
I am new to perl and need help to solve a problem.
I have a table in below format.
<Text A>
<Pattern1>
A Value
B Value
C Value
D Value
<Pattern2>
<Text B>
This table is in file1. I want to extract lines between Pattern1 and Pattern2 and write it into file2.... (11 Replies)
Hi All,
I need a script to extract a lines between two patterns.I have done this using grep,cut,tail and head.But its very slow, because my input file contain more than a lakh.
COMMAND:XXXXXXXXXXXXXXXXXXXX
yyyyy
zzzzzz
REQUESTSTRING:aaaaaaaaaaaaaaa;11111
222222
333333... (4 Replies)
Hi All,
I want to extract the text between some pattern which occurs repeatedly in a file. For example my input is like,
/home/.....
..........java:25: cannot find symbol
............
/home/......
/home/.......
I want to display... (2 Replies)
Hi,
I have a file with many lines and need to extract lines between 2 patterns (AAA and BBB) and merge all the in-between lines into single line separated by space.
$ cat file1
blah blah blah
blah AAA
1
2
3
blah BBB
blah blah blah
blah blah blah
blah blah blah
AAA
5
6
blah blah... (4 Replies)
Hi
I have two lists of patterns named A and B consisting of around 200 entries in each and I want to extract all the sentences from a big text file which match atleast one pattern from both A and B.
For example, pattern list A consists of :
ama
ani
ahum
mari
...
...
and pattern... (1 Reply)
I have a list in the format below, how do I read through the list and extract the lines between the ##START## and ##END##, so i can check for specific values between each ##START## & ##END## pattern
##START##
RANDOMTEXT
DFGSD
SDFSDF
##END##
##START##
morestuff
sdfggfg
sdfsdf... (10 Replies)
Hello.
For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)