10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Good Morning,
i ran into some trouble this morning while 'improving' my monitoring stuff. i would like to get a warning when the number of mails sent (outbound) by postfix is above a certain number. so far, so easy. to test that i simply put
cat /var/log/mail.info | grep 'to=<' | grep -v -e... (1 Reply)
Discussion started by: Mike
1 Replies
2. UNIX for Beginners Questions & Answers
PH=(6H 0 0 JD 9S 0 KD 0) #input from .txt file
In the above array, I am trying to get the computer to tell me at what indices the non-zeros are at.
I don't understand why this doesn't work...
grep -v -b "0" ph.txt > position.txt
Isn't grep -v supposed to show non matches in Bash?... (2 Replies)
Discussion started by: cogiz
2 Replies
3. Shell Programming and Scripting
Hi Everyone,
in the below "xyz (Exception e)" part... after the curly braces, there is a new line and immediately few tabs are present before closing curly brace.
xyz (Exception e) {
}
note: there can be one or... (1 Reply)
Discussion started by: NY_777
1 Replies
4. OS X (Apple)
Hi,
I'm using Mac 10.9.1. I would like to create an alias for grep so that it won't print out messages like "grep: /Users/davea/workspace/myproject/subdir/: Is a directory" all the time. So in my terminal, I opened ~/.profile and entered
alias grep='grep -s'
However, when I close and... (5 Replies)
Discussion started by: laredotornado
5 Replies
5. UNIX for Dummies Questions & Answers
I have a text file (allWords.txt), that I would like to search through. Here is a snippet of what it looks like...
a
aah
aahed
aahing
aahs
aardvark
aardvarks
aardwolf
ab
abaci
aback
abacus
abacuses
abaft
......
I would like to use the grep search to search, line by line, for... (8 Replies)
Discussion started by: blackvelvet
8 Replies
6. Shell Programming and Scripting
I am trying to make a script that has grep finding lines that I get from the cat command, that start with something and end with an argument. I can get the first part, but whenever I try to add on the part that looks at the end of the line too, it stops working. Any ideas why? Here is my script:
... (11 Replies)
Discussion started by: sammythesp3rmy
11 Replies
7. Shell Programming and Scripting
hi people,
I have a text file containing data, seperated by TAB. I want to process this tab'ed data as variable. how can I assign this?
Ex:
11aaa 12000 13aaa 14aaa 15aaa 16aaa 17aaa
21aaa 22000 23aaa 24aaa 25aaa 26aaa 27aaa
31aaa 32000 33aaa 34aaa 35aaa 36aaa 37aaa
41aaa 42000 43aaa... (5 Replies)
Discussion started by: gc_sw
5 Replies
8. Shell Programming and Scripting
Hi,
I search for the string below which contains a single quote,
some text '/home/myuser
in the file myfile.txt as another user with the grep command as follows
su - myuser -c "grep 'some text \'/home/myuser' myfile.txt"
I also tried using two backslashes
su - myuser... (6 Replies)
Discussion started by: cimcmahon
6 Replies
9. Shell Programming and Scripting
Hi,
I have a txt file will a lot of data...however, some of them a duplicated and I would like to remove it. Normally, I need to edit txt and delete it. But it take a lot of time to do....
filename.txt:
orange
apple
cake
pink
apple
if using grep -v 'apple' filename.txt >... (10 Replies)
Discussion started by: happyv
10 Replies
10. Shell Programming and Scripting
Frenz,
I have a file with certain columns from ls -lR which looks something like:
file stemp
----------
lrwxrwxrwx ./temp/s1 -> 2.ksh
lrwxrwxrwx ./temp/s2 -> 3.ksh
lrwxrwxrwx ./temp/subtemp/s3 -> 1.ksh
lrwxrwxrwx ./temp/subtemp/s4 -> 2.ksh
lrwxrwxrwx ./temp/s5 -> ... (9 Replies)
Discussion started by: manthasirisha
9 Replies