10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. Shell Programming and Scripting
I am writing a shell script to perform few health checks of the system, where I need to delete the previous line in the text file after pattern match using sed (or) awk.
Could you please help me out on this?
<td style=color:green align=center>
</tr>... (6 Replies)
Discussion started by: Nagaraj R
3. Shell Programming and Scripting
I have sample of listing as following
Database 2 entry:
Database alias = PXRES
Database name = PXRES
Local database directory = /db2/data1/db2phnx
Database release level = d.00
Comment ... (3 Replies)
Discussion started by: ckwan
4. Shell Programming and Scripting
Bash/Oracle Linux 6.4
A basic requirement.
How can I get nth line of a file printed ? Can I use grep in this case ?
In the below file, 12th line is "Kernel parameter check passed for rmem_max" . I just want the 12 line to be printed.
# cat sometext.txt
Kernel version check... (2 Replies)
Discussion started by: John K
5. UNIX for Dummies Questions & Answers
I want to print the nth and n+1 lines from a file once it gets a pattern match.
If I find a match for bbb then I need to print bbb as well as 3rd and 4th line from the match.. Please help..Is it possible to get a command using sed :) (6 Replies)
Discussion started by: saj
6. Shell Programming and Scripting
How to print every nth line. File like this:
3 (3 Replies)
Discussion started by: attila
7. Shell Programming and Scripting
I've list of LDAP records in this format:
cmmac:... (4 Replies)
Discussion started by: tomas.polak
8. Shell Programming and Scripting
I am looking for any script which can do the following.
have to read a pattern from fileA and copy it to fileB.
Header (3 Replies)
Discussion started by: anilvk
9. Shell Programming and Scripting
I have many scripts in particular directory. And few of the scripts have exit 0 in second line. Now i wanted to list out the scripts name which has the exit 0 in its second line
I tried many options , but i can not get the filename along with the nth line pattern match :mad:. Can anyone... (14 Replies)
Discussion started by: puni
10. UNIX for Dummies Questions & Answers
Need some idea on file processing, I have file like below,
Processing al sources ...
...No value found :
Completed comparing all sources.
Processing al targets ...
...No value found :
From above I need to extract the line where "No value... (4 Replies)
Discussion started by: braindrain