10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi guys,
i want command or script to display the content of file from 2nd position to last but one position of a file
abcdefghdasdasdsd
123,345,678,345,323
434,656,656,656,656
678,878,878,989,545
4565656667,65656
i want to display the same above file without first and... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies
2. Shell Programming and Scripting
I have this:
301205 0000030000041.49000000.00 2011111815505 908
301205 0000020000029.10000000.00 2011111815505 962
301205 0000010000027.56000000.00 2011111815505 3083
312291 ... (2 Replies)
Discussion started by: herot
2 Replies
3. Shell Programming and Scripting
I have a file with the below format,
GS*8*****
ST*1********
A*
B*
E*
RMR*123455(This is the unique number to locate this row)
F*
SE*1***
GE**
GS*9*****
ST*2
H*
J*
RMR*567889(This is the unique number to locate this row)
L*
SE*
GE***** (16 Replies)
Discussion started by: Muthuraj K
16 Replies
4. Shell Programming and Scripting
Hi there, I have the following output,
# raidctl -l
RAID Volume RAID RAID Disk
Volume Type Status Disk Status
------------------------------------------------------
c0t1d0 IM OK c0t1d0 OK
... (4 Replies)
Discussion started by: rethink
4 Replies
5. Shell Programming and Scripting
I'm attempting to write a script to identify users who have sudo access on a server. I only want to extract the ID's of the sudo users after a unique line of text. The list of sudo users goes to the EOF so I only need the script to start after the unique line of text. I already have a script to... (1 Reply)
Discussion started by: bouncer
1 Replies
6. 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
7. UNIX for Dummies Questions & Answers
Hi All,
I would like to extract from a text file m lines skipping n lines after a string occurrency. Is it possible with grep?
e.g.
qqq
ww
eee
rrr
ttt
yyy
uuu
I want to print 2 lines skipping 1 line after the string 'ww'
result would be
rrr
ttt (2 Replies)
Discussion started by: f_o_555
2 Replies
8. 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
9. Shell Programming and Scripting
Hi,
I'm trying to match records using awk which contain only one occurance of my string, I know how to match one or more (+) but matching only one is eluding me without developing some convoluted bit of code. I was hoping there would be some simple pattern matching thing similar to '+' but... (9 Replies)
Discussion started by: jonathanm
9 Replies
10. Shell Programming and Scripting
Hi Folks,
I have a file with all fields defined by byte position, but any field can be empty so I cannot print lines based on a search of specific columns. I need to print all lines of this file where the string of two characters at byte position 100-101 contains the number 27. Any ideas?
... (4 Replies)
Discussion started by: HealthyGuy
4 Replies