10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, I have an input file that looks like so:
LDLR
LDLRAD4
VLDLR
when I grep "LDLR" I get an output of:
LDLR
LDLRAD4
VLDLR
Since all names have "LDLR" included within them, but all I want the output to be is
LDLR
I know it can work if I surround the words with pipes for... (5 Replies)
Discussion started by: Rabu
5 Replies
2. UNIX for Dummies Questions & Answers
HI,
I have a command to check a license file.
License_print.
In that file you get the headlines and all different licenses.
Now i want to have things extracted from it.
so i do like following:
license_print | grep -iw -e "user" -e "admin"
But i donīt want all lines where user is... (11 Replies)
Discussion started by: Tzwaj
11 Replies
3. Shell Programming and Scripting
Dear All,
I am using the grep command..
bash-3.2$ grep TR2 /mydata/MISE/MAPPLI/USD/mytransfer/_SRY10566_124005.mail | cut -d "/" -f2-|cut -d ":" -f2
The output is
/my_repo/*/MYOPS/SR123/SRY78623/RDM/RY_USD
bash-3.2$ abc=$(grep TR2 /mydata/MISE/MAPPLI/USD/mytransfer/_SRY10566_124005.mail... (1 Reply)
Discussion started by: yadavricky
1 Replies
4. Shell Programming and Scripting
Hi there,
I need to grep out 1 line of a changing file. Any help would be much appreciated.
code:
xterm -hold -e tail -f /var/lib/dhcp3/dhcpd.leases | grep client-hostname &>/dev/null &
The trouble is it shows the contents of the entire lease file.
I just want to show the line... (5 Replies)
Discussion started by: digitalviking
5 Replies
5. UNIX for Dummies Questions & Answers
more Hello.txt
it was a sunny way and i was about to go home.
I need to grep and redirect to a new file all the text between 'sunny' and 'go' string above.
Note: There may be multiple lines in between the string i need to grep between. If there are multiple 'go' strings it should grep till... (9 Replies)
Discussion started by: mohtashims
9 Replies
6. Shell Programming and Scripting
The below command is not working
stackmem="$(pmap $1 | grep -i '' | awk '{print $2}'| tr -d ' K')"
I need to grep strictly for ---->
Regards,
Mohtashim (2 Replies)
Discussion started by: mohtashims
2 Replies
7. Shell Programming and Scripting
Hi
I have 2 directories t1 and t2 with some files in it. I have to see whether the files present in t1 is also there in t2 or not. Currently, both the directories contain the same files as shown below:
$ABC.TXT
def.txt
Now, when I run the below script, it tells def.txt is found,... (5 Replies)
Discussion started by: guruprasadpr
5 Replies
8. Shell Programming and Scripting
<record>
<set>
<termId>1234</termId>
<termType>First</termType>
</set>
<set>
<termId>5678</termId>
<termType>Second</termType>
</set>
</record>
This is saved in record.xml
Hi
I have this sample XML that i am grepping using a shell program.
The objective of the task is - based... (7 Replies)
Discussion started by: revertback
7 Replies
9. UNIX for Dummies Questions & Answers
I have a file that has the following:
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
591066 100.0
... (5 Replies)
Discussion started by: Pablo_beezo
5 Replies
10. UNIX for Dummies Questions & Answers
using grep, i have a file emp.lst, and i want all those records
where "S" or "s" (capital or small) is not there
i used this
grep emp.lst
when i use grep emp.lst
i am getting rows with S..but why negate (^) is not working? (3 Replies)
Discussion started by: soujanya_srk
3 Replies