10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My file has the following contents...
User:SYS,O/SUser:oracle,Process:10813484,Machine:host123.xxx.xxx.xxxxxxx.com.au,Program:sqlplus@host123.xxx.xxx.xxxxxxx.com.au(TNSV1-V,LogonTime:24-JUL-2014
15:04
I would like to print all character appearing after the string LogonTime:
My output... (5 Replies)
Discussion started by: Nagesh_1985
5 Replies
2. Shell Programming and Scripting
RHEL 5.8
I have a text file like below. I want to grep for a string and then print the next 4 lines including the line with the string I grepped for
For eg:
I want grep for the string HANS and then print the next 4 lines including HANS
$ cat someText.txt
JOHN
NATIONALITY:... (7 Replies)
Discussion started by: omega3
7 Replies
3. Shell Programming and Scripting
Hi,
I have a file with contents
test id text day
test sah dh dhs
yeay fg jsh jsjk
my need:
I give a string as a input, it check the file and display the lines with the given string
e.g
input : test
output:
test id text day
test sah dh dhs (1 Reply)
Discussion started by: nanthagopal
1 Replies
4. UNIX for Dummies Questions & Answers
i have a file that looks like this
ABC123
aaaaaaaaaaaaaaasssssssssssssssffhhh
ABC234
EMPTY
ABC652
jhfffffffffffffffffffffffffffffffffffkkkkkkkkkkkk
i want to grep "EMPTY" and print ABC234 (3 Replies)
Discussion started by: engr.jay
3 Replies
5. Shell Programming and Scripting
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Discussion started by: Mbohmer
6 Replies
6. Shell Programming and Scripting
I am parsing a nagios config, searching for a string, and then printing the line 2 lines later (the "members" string). Here's the data:
define hostgroup{
hostgroup_name chat-dev
alias chat-dev
members thisisahostname
}
define hostgroup{
... (1 Reply)
Discussion started by: mglenney
1 Replies
7. Shell Programming and Scripting
I have several very large file that are extracts from Oracle tables. These files are formatted in XML type syntax with multiple entries like:
<ROW>
some information
more information
</ROW>
I want to grep for some words, then print all lines between <ROW> AND </ROW>. Can this be done with AWK?... (7 Replies)
Discussion started by: jbruce
7 Replies
8. Shell Programming and Scripting
I have a textfile containing text similar to the following pattern:
STRING1
UNIQUE_STRING1
STRING2
STRING3
STRING4
STRING5
STRING1
UNIQUE_STRING2
STRING2
STRING3
STRING4
STRING5
STRING1
UNIQUE_STRING3
STRING2
STRING3 (6 Replies)
Discussion started by: ilcsfe
6 Replies
9. Shell Programming and Scripting
Hi,
I want to print the lines in a file that matches particular string format using shell scripting. (4 Replies)
Discussion started by: sudhakaryadav
4 Replies
10. Shell Programming and Scripting
frnd,
Is there any way to print only the string that matched the pattern instead printing the whole line?
thanks in advance. (3 Replies)
Discussion started by: clx
3 Replies