10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a txt file and I would like to use egrep without using -v option to exclude the lines which matches with multiple Strings.
Let's say I have some text in the txt file. The command should not fetch lines if they have strings something like
CAT MAT DAT
The command should fetch me... (4 Replies)
Discussion started by: Sathwik
4 Replies
2. Shell Programming and Scripting
I have requirement in my every files starting lines have # needs to be not processing or exclude the that lines.
I have written a code like below, but now working as expected getting ERROR" line 60:
1 #!/bin/sh
2 echo ======= LogManageri start ==========
3
4 #This directory is... (1 Reply)
Discussion started by: Chenchireddy
1 Replies
3. Shell Programming and Scripting
/bin/sed -n ';4757335,$ p' | wc -l
/bin/sed -n ';4757335,$ p' | egrep "Failed" | egrep -c "PM late arrrival"
how can i combine the above two sed commands into one? i want to count the number of lines between the specified line number and the end of the file. AND and i want to count how many... (5 Replies)
Discussion started by: SkySmart
5 Replies
4. Shell Programming and Scripting
Hi, I have one file, I need to check if file exist or not and then remove the lines which starts with ?
My file1.out data is some thing
abcabcppp
xyzxyzpqr
?????????
?????????
Output should be in test.out
abcabcppp
xyzxyzpqr
I am getting the output as below but the File does not exist... (4 Replies)
Discussion started by: Ramyajiguru1
4 Replies
5. Shell Programming and Scripting
Hi Guys,
I have an awk script that would search the input file for line that starts with a number 3 and copies into a new text file.
I want to extend this script to find the lines that either starts with 3 or a or b and copy all those lines into the new file.
Here is what I have so far:... (1 Reply)
Discussion started by: Amith821
1 Replies
6. Shell Programming and Scripting
I need to delete those lines from a file, which starts with 45.
How to do it? (3 Replies)
Discussion started by: mady135
3 Replies
7. UNIX for Dummies Questions & Answers
hiiiii
$ grep ^"#" $file
Will give the lines , which starts with # .And I wanna get the lines which are not starting with #.
How to implement that.
Thanking you
Krish:b: (10 Replies)
Discussion started by: krishnampkkm
10 Replies
8. Shell Programming and Scripting
How can I delete those lines that starts with a certain letter?
abc def ghi
xyz abc def
ace gik moq
abe imq gxm
I want to delete the line that starts with "x". Thanks! (4 Replies)
Discussion started by: kingpeejay
4 Replies
9. Shell Programming and Scripting
I use while do - done loop in my shell script. It is working as per my expectations.
But I do not want to process all the lines. I am finding it difficult to exclude certain lines.
1) I do not want to process blank lines as well as lines those start with a space " "
2) I do not want to... (2 Replies)
Discussion started by: shantanuo
2 Replies
10. Shell Programming and Scripting
I have a log file that I am processing. This contains messages from and to a server (requests and responses).
The responses to requests may not be in order i.e. we can have a response to a request after several requests are sent, and in some error cases there may not be any response message.
... (2 Replies)
Discussion started by: BootComp
2 Replies