10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am currently having some issues while trying to grep for a exact string inside a file. I have tried doing this from command line and things work fine i.e. when no match is found, return code=1 but when its done as part of my script it returns 0 for the same command - I dont know if there is an... (6 Replies)
Discussion started by: Ads89
6 Replies
2. Shell Programming and Scripting
Hi,
I need to search the exact pattern in a file
file.txt
AUS.txt|AUS.chk
NZ.txt|NZ.ch
I am getting the result as
AUS.txt|AUS.chk with below code but i need only AUS.txt to be printed
grep AUS.txt file.txt
CODE tags also for data files (8 Replies)
Discussion started by: rohit_shinez
8 Replies
3. Shell Programming and Scripting
Hi ,
I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows.
# diff mir_lex.c.modified mir_lex.c.orig
3209c3209
< if(yy_current_buffer -> yy_is_our_buffer == 0) {
---
>... (5 Replies)
Discussion started by: breezevinay
5 Replies
4. UNIX for Dummies Questions & Answers
I have a file with a lot of IP addresses in it named "address.list".
address.list looks something like this:
10.77.50.11
10.77.50.110
10.77.50.111
a bunch more addresses
For every IP address I need to grep another file to see if the IP address is in the other file:
for x in `cat... (5 Replies)
Discussion started by: squoggle
5 Replies
5. Shell Programming and Scripting
Im stumped on this one. Id like to echo into a .txt file all names for an xml feed in a huge folder. Can that be done?? Id need to echo <name>This name</name> in client.xml files.
$path="/mnt/windows/path"
echo 'recording names'
cd "$path"
for names in $path
than Im stuck on... (2 Replies)
Discussion started by: graphicsman
2 Replies
6. Shell Programming and Scripting
I am attempting to grep an exact string from a series of files within a directory and append that output to the filename when it is present in the file. I've been after this all day with no luck. Thanks for your help in advance :wall:. (4 Replies)
Discussion started by: JC_1
4 Replies
7. Shell Programming and Scripting
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1
CAR2_KEY0
CAR2_KEY1
CAR1_KEY10
CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1
grep... (1 Reply)
Discussion started by: thibodc
1 Replies
8. Shell Programming and Scripting
Hi,
I have the following output from a file
zone "adm.test.com" {
abc
test1.db
}
zone "test.com" {
xyz
test2.db
}
zone "1.test.com.sg" {
1abc
test3.db
}
zone "3.test.com.uk" {
1xyz
test4.db
} (6 Replies)
Discussion started by: vchee
6 Replies
9. Shell Programming and Scripting
I have a output like below:
A1
B2
C1
D3
A12
B4
A14
I am trying to find A1 by using grep
grep -i "A1"
But I got (4 Replies)
Discussion started by: anupdas
4 Replies
10. Shell Programming and Scripting
Hi
Let say there is a file a.txt which contain number rows.
My intention is to find the number of occurences of a pattern. Let say the pattern is mdbase. then it should not count the occurences of mdbase1 or mdbase2 like this. When I tried to find it like
grep "/backup/surjya/mdbase"... (7 Replies)
Discussion started by: surjyap
7 Replies