10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file with 2 lines of code
Rome is in Romeo
Romeo is in Rome
How do I grep, so that only last line would be the outcome.
sample output
Romeo is in Rome
I have tried with all possible greps but its resulting in both the lines in output.
Please help. (6 Replies)
Discussion started by: gotamp
6 Replies
2. UNIX for Dummies Questions & Answers
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
8 Replies
3. Shell Programming and Scripting
Hi All,
I am trying to fetch lines before a pattern, I got to know about -B flag in grep but we have to pass the number to get those lines before some pattern say (X), now what if I want to get line/s with some other pattern say (Y) before X pattern? How to get about it? please help.
Input:... (5 Replies)
Discussion started by: dips_ag
5 Replies
4. 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
5. Shell Programming and Scripting
Hello Colleagues,
I have a file that looks like below.
6-12731913-12731913
9230760143480
410018547148230
20131002193434+0500
20131002193434+0500
;20131002T161031000-10.50.241.21-21912131-1419034760, ver: 0
20131009
92220056296730
CC0P
abc
Core_Context_R1A
SMS
6-12726796-12726796... (14 Replies)
Discussion started by: umarsatti
14 Replies
6. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
7. 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
8. Shell Programming and Scripting
hi ,
my lilo.conf is as shown below :
prompt
default=Primary
read-only
image=/boot/bzImage
label=Primary
root=/dev/md0
append="reboot=t md=0 ip=off panic=5 quiet console=ttyS0,115200n81"
read-only
image=/boot/bzImage
label=Recover
root=/dev/sda3
... (7 Replies)
Discussion started by: success
7 Replies
9. Shell Programming and Scripting
Hi,
When we have a failure, sometimes we just step restart the job from the next step. Later when we open the log for analysis of the failure, it is becoming difficult to go to the failure part.
For eg., if it is a 1000 line log, the failure may be at 500th line. so wat i want to do is, grep... (6 Replies)
Discussion started by: ajayakunuri
6 Replies
10. UNIX for Advanced & Expert Users
HI....
It's fallow up file ..
#./show.sh click enter button.. i am gettng the fallowup file. its keep on running every time why because there are lots of users working on it.
In that file i want to search pattern between two words
for ex:
SELECT DISTINCT... (7 Replies)
Discussion started by: ksr.test
7 Replies