10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi
I wanted to know if there is an option in grep command to show the number of results (not the number of lines of findings).
Thanks (14 Replies)
Discussion started by: abdossamad2003
14 Replies
2. Shell Programming and Scripting
Hello,
I have a Textfile sees like this
"Word1":aksdfjaksdf
"Word2":askdfjalsdkfdlsjfasldfj
"This is Word3":asdfkjalskdfj
what i need is a string which sees like this
Word1;Word2;This is Word3
Conclusion always the text within "" which is before the :
i tried it with grep.... (10 Replies)
Discussion started by: SwordMaster
10 Replies
3. Shell Programming and Scripting
Hi,
i have a file hello.log which as several line that look like the below
2015-12-07 09:46:56 0:339 120.111.12.12 POST /helloWorld
2015-12-07 09:46:57 0:439 122.111.12.12 POST /helloWorld
....
when i grep expecting to see results like the below.
... (6 Replies)
Discussion started by: mohtashims
6 Replies
4. Shell Programming and Scripting
Hello
I want to check whether certain arguments were passed to the script, and when those are, not doing a log entry.
If those arguments are not passed, always do a log entry (*new call*).
What currently i have is this:
echo "${@}"|grep -q \\- || \
tui-log -e "$LOG" "\r---- New call $$... (4 Replies)
Discussion started by: sea
4 Replies
5. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am currently reading a tar file and searching for a particular word using grep e.g. Plane. At the moment, if a sentence is found with the word "Plane" the sentence itself is piped to another file.
Here is the code i am using;
for jar in 'cat jar_file.tar'; do
tar -tvf... (3 Replies)
Discussion started by: crunchie
3 Replies
7. UNIX for Dummies Questions & Answers
Hi
I really hope someone can help with the below question.
Lets say that I have a file called output.txt and I want to display all of the lines which contain the word ‘disconnect'. I know that this can easily be obtained by using the following command:
grep -i disconnect output.txt
However,... (6 Replies)
Discussion started by: Sunny Sid
6 Replies
8. UNIX for Dummies Questions & Answers
I'm using the command grep -l XYZ to get a list of files containing the string XYZ. Then I using the comand ls -l ABC to get the create date timestamp of the each file. I've tried combining the comands using the pipe command, grep -l XYZ | ls -l, but its not working. What am I doing wrong? (3 Replies)
Discussion started by: jhtate
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Can anyone translate in words what this line command does:
ls *.fits | grep -v "Zero\|zero" > objlist
Obviously ls *.fits means to list all the fits file, grep looks for a certain word, Zero is a certain fits file, and > objlist , created a list with certain items, but I am not sure what... (3 Replies)
Discussion started by: cosmologist
3 Replies
10. UNIX for Dummies Questions & Answers
On our one HP-UX 11i box, we have some very long paths defined. When I want to check on our user processes running, the resulting paths are chopped off. /xyz/abc/123/......./server/b is really a process running in the ..../server/bin directory. Is this a terminal problem or buffer length... (1 Reply)
Discussion started by: bsp18974
1 Replies