10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Can someone advise/help me on how to write a script to extract sequential lines. I was able to find and get a script working to create permutations of the inputs, but that not what I want/need.
awk 'function perm(p,s, i) {
for(i=1;i<=n;i++)
if(p==1)
... (4 Replies)
Discussion started by: fuzzi
4 Replies
2. UNIX for Dummies Questions & Answers
Im trying compare values between files and if they match I want to extract some characters in between those values for many files. They are in two directories and have the name filename but one ends in .enr. They look like this.
cat bat.1.enr
name,start,end
bat.1,231, 234
and another... (5 Replies)
Discussion started by: verse123
5 Replies
3. Shell Programming and Scripting
Hi there,
Looking forward to your advice for the below:
I have a file which contains 2 paragraphs related to a particular pattern. I have to search for those paragraphs from a log file and then print a particular line from those paragraphs.
Sample:
I have one file with the fixed... (3 Replies)
Discussion started by: danish0909
3 Replies
4. UNIX for Dummies Questions & Answers
Hello
ifconfig return :
eth0 Link encap:Ethernet HWaddr 11:24:1D:C1:99:BA
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37307 errors:0 dropped:0 overruns:0 frame:0
... (2 Replies)
Discussion started by: jcdole
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a string looks like the following:
USERS 32767.9844 UNDOTBS1 32767.9844 SYSAUX 32767.9844 SYSTEM 32767.9844 EMS 8192 EMS 8192 EMS_INDEXES 4096 EMS_INDEXES 4096 8 rows selected.
How do I extract a sub-string to get the expected output as following:
EMS 8192
EMS_INDEXES 4096
... (3 Replies)
Discussion started by: NetBear
3 Replies
6. UNIX for Dummies Questions & Answers
My scenario:
1. textfle
2. every line similar to:
"...____ your sister?is1are0am0Grammar point1_______ the chairs in..."
3. need to extract only the numbers in each line, eg 001 in the case above.
Tried different GREP/Sed combinations but...here I am
An output like that would be... (9 Replies)
Discussion started by: eldeingles
9 Replies
7. Shell Programming and Scripting
Hi All,
I am pretty new to pattern matching and extraction using shell scripting. Could anyone please help me in extracting the word matching a pattern from a line in bash.
Input Sample (can vary between any of the 3 samples below):
1) Adaptec SCSI RAID 5445
2) Adaptec SCSI 5445S RAID
3)... (8 Replies)
Discussion started by: jharish
8 Replies
8. Shell Programming and Scripting
Hi All ,
I need to extract the strings that are matching with the pattern : CUST.<AnyStringOfAnyLength>.<AnyStringOfAnyLength> from a file and then write all these string into another file.
e.g. If a file SOURCE contains following lines :
IF(CUST.ABCD.EFGH==1) THEN
CUST.ABCD.EFGH =... (7 Replies)
Discussion started by: swapnil.nawale
7 Replies
9. Shell Programming and Scripting
Hi All,
as the title says I need to extract N lines after match number X of a pattern.
e.g.
111
xxx
xxx
111
yyy
yyy
111
www
www
111
zzz
zzz
I would like to extract the two lines after the second 111 occurrence.
I tried with grep but I didn't find any options to do that.
Any... (11 Replies)
Discussion started by: f_o_555
11 Replies
10. Shell Programming and Scripting
Hi there,
i'm having some problems just making an awk script (i've tried this way, but other way can be posible for sure), for the next file
file.txt
<register>
<createProfile>
<result>0</result>
<description><!]></description>
<msisdn>34661461174</msisdn>
<inputOmvID>1</inputOmvID>... (6 Replies)
Discussion started by: vicious
6 Replies