10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to help to work this
Print everything between 2 patterns if grep is not found the search word
example
Detroit
orange
cat
bat
rat
apple
sed -n "/Detroit,/apple/p" d |grep chicago
output would be
Detroit
orange
cat
bat
rat (1 Reply)
Discussion started by: jhonnyrip
1 Replies
2. 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
3. Shell Programming and Scripting
HI
Input :
Counters
Counter
Int
Ints
Counters
Counters
Ints
Ints
I want to grep Counter|Int
Output :
Counter (1 Reply)
Discussion started by: pareshkp
1 Replies
4. UNIX for Dummies Questions & Answers
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
Discussion started by: 100bees
2 Replies
5. Shell Programming and Scripting
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies
6. Shell Programming and Scripting
Hi All,
I am trying to select all files in a directory which are not with .gz extension .
for which I am using below script ,
but its rejecting both .gz and .z extension files,as in each letter is considered separately.
PFB
ls -lrt | awk '{print $9}'| egrep "^IRAMS.*$"
please suggest... (1 Reply)
Discussion started by: Jcpratap
1 Replies
7. Shell Programming and Scripting
Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match.
I'm stuck in an AWK... (9 Replies)
Discussion started by: right_coaster
9 Replies
8. Shell Programming and Scripting
Hi,
I try to grep lines with pattern like
float_or_int float_or_int float_or_int
where float_or_int is any float or any integer of any length.
I tried some :
grep "* * *" FILENAME #Work for integers but not for floats
grep '\<.*\> \<.*\> \<.*\>' FILENAME #Work for float but not... (4 Replies)
Discussion started by: tipi
4 Replies
9. Shell Programming and Scripting
hi,
I have few text templates
as a simple ex:
template 1
city Name:
zip code:
state Name:
template2:
employee Name:
Phone number:
I wish to grep on given text file and make sure the text file matches one of these templates. Please give your ideas. (6 Replies)
Discussion started by: rider29
6 Replies
10. UNIX for Dummies Questions & Answers
hi,
i'm having problem like this.
i wish to grep some keyword from certain files in one directory.
let's say i have a lot of files in my directory with the name of file.1 file.2 file.3 ...... file.500
i only wish to grep the keyword from file.20, file.21, file.23 .... file.50
i tried... (5 Replies)
Discussion started by: rei
5 Replies