10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, I need to print lines which are matching with start pattern "SELECT" and END PATTERN ";" and only select the last "select" statement including the ";" .
I have attached sample input file and the desired input should be as:
INPUT FORMAT:
SELECT
ABCD,
DEFGH,
DFGHJ,
JKLMN,
AXCVB,... (5 Replies)
Discussion started by: nani2019
5 Replies
2. Shell Programming and Scripting
Hello,
i need help with awk.
I have this file:
cat number
DirB port 67 er_enc_out 0 er_bad_os 0
DirB port 71 er_enc_out 56 er_bad_os 0
DirB port 74 er_enc_out 0 er_bad_os 0
DirB port 75 ... (4 Replies)
Discussion started by: elilmal
4 Replies
3. Shell Programming and Scripting
Hello,
I can extract lines in a file, between two strings but only one time.
If there are multiple occurencies, my command show only one block.
Example, monfichier.txt contains :
debut_sect
texte L1
texte L2
texte L3
texte L4
fin_sect
donnees inutiles 1
donnees inutiles 2
... (8 Replies)
Discussion started by: theclem35
8 Replies
4. Shell Programming and Scripting
Hi,
I need a help to search a pattern and print the multiple lines between them.
Input file:
Tue May 29 12:30:33 EDT 2012:threadWebContainer : 357:com.travimp.hotelierlinks.abba.service.RequestHandler.requestService(String, ITICSDataSet): hotelCancelReservation request: ... (4 Replies)
Discussion started by: aroragaurav.84
4 Replies
5. Shell Programming and Scripting
Hello all,
I have thousand file input like this:
file1:
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$ | | | |$$
$$ UERT | TTYH | TAFE | FRFG |$$
$$______|______|________|______|$$
$$ | | | |$$
$$ 1 | DISK | TR1311 | 1 |$$
$$ 1 |... (4 Replies)
Discussion started by: attila
4 Replies
6. Shell Programming and Scripting
Hey,
Need some help for command to print only lines with two columns in a file
abc 111
cde 222
fgh
ijk 2
klm 12 23
nop
want the ouput to be
abc 111
cde 222
ijk 2
Thanks a lot in advance!!! (3 Replies)
Discussion started by: leo.maveriick
3 Replies
7. Shell Programming and Scripting
Could someone please point me in the right direction with the following?
I have a program that generates logs that contains sections like this:
IMAGE INPUT
81 0 0.995 2449470 0 1726 368 1 0.0635 0.3291
82 0 1.001 2448013 0 1666 365 1 0.0649 ... (4 Replies)
Discussion started by: euval
4 Replies
8. Shell Programming and Scripting
abc.dat
tty cpu
tin tout us sy wt id
0 0 7 3 19 71
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.0 133.2 0.0 682.9 0.0 1.0 0.0 7.2 0 79 c1t0d0
0.2 180.4 0.1 5471.2 3.0 2.8 16.4 15.6 15 52 aaaaaa1-xx
I want to skip first 5 line... (4 Replies)
Discussion started by: kchinnam
4 Replies
9. Shell Programming and Scripting
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies
10. Shell Programming and Scripting
Hi!
How can I print out a specific range of rows, like "cat file | awk NR==5,NR==9", but in the END-statement?
I have a small awk-script that finds specific rows in a file and saves the line number in an array, like this:
awk '
BEGIN { count=0}
/ZZZZ/ {
list=NR
... (10 Replies)
Discussion started by: Bugenhagen
10 Replies