10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I need to print the characters in the previous line just before the regular expression match
Please have a look at the input file as attached
I need to match the regular expression ^ with the character of the previous like and also the pin numbers
and the output file should be like... (6 Replies)
Discussion started by: kshitij
6 Replies
2. AIX
Please help me
print nth line after match
awk or sed one line command. (3 Replies)
Discussion started by: sushma123
3 Replies
3. Shell Programming and Scripting
Hello,
I have below format log file,
Comparing csv_converted_files/2201/9747.1012H67126.5077292103609547345.csv and csv_converted_files/22019/97447.1012H67126.5077292103609547345.csv
Comparing csv_converted_files/2559/9447.1012H67126.5077292103609547345.csv and... (6 Replies)
Discussion started by: arvindshukla81
6 Replies
4. Shell Programming and Scripting
plz help me!!
I have this file ,
3408 5600
3796 6035
4200 6285
4676 0
40 1554
200 1998
652 2451
864 2728
1200 0
I want it like if $2==0,replace it with field from the previous line+500
say here the o/p would be like
3408 5600
3796 6035
4200 6285... (16 Replies)
Discussion started by: Indra2011
16 Replies
5. UNIX for Dummies Questions & Answers
Hi guys,
I have found your forum super useful. However, right now I am stuck on a seemingly "simple" thing in AWK. I have two columns of data, the first column in Age (in million years) and the second column is Convergence Rate (in mm/yr).
I am trying to process my data so I can use it to... (2 Replies)
Discussion started by: awk_noob_456
2 Replies
6. Shell Programming and Scripting
hi everyone,
a
b in
c
d
e
f in
g
output is:
a
e
so awk search for "in", then print out the matched line's previuos line.
Please advice. (11 Replies)
Discussion started by: jimmy_y
11 Replies
7. Shell Programming and Scripting
My requirement is that when ever search criteria matchs in log file, the previous line just above the search word as well as search word should be print.
sample log file
--03-19T11:26 xxx create version "a.sh@@/main/6"
"104157 "
--03-18T16:01 xxx create version "a.sh@@/main/5"
... (6 Replies)
Discussion started by: jadoo_c2
6 Replies
8. Shell Programming and Scripting
Need help creating a script that does the following:
Sort a file
Compare the previous line "last field" with current line "last field"
If they are the same, print output to a file
If they are different print output to a new file
The script should keep creating new files if the previous... (5 Replies)
Discussion started by: Muga801
5 Replies
9. Shell Programming and Scripting
HELLO...I wanted to ask you, than sure know unix more than me, as I can obtain the following solution: I have a file with rows of the type:
CIAO COME STAI
PERCHE COME STAI
CIAO COME VA
ALLO CHE FACCIAMO
.................
I would that if in a line is present the word (for example) " CHE... (9 Replies)
Discussion started by: fabi20
9 Replies
10. Shell Programming and Scripting
I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one:
User1NameLast User1NameFirst User1Address
E-Mail:User1email
User2NameLast User2NameFirst User2Address... (11 Replies)
Discussion started by: walkerwheeler
11 Replies