10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
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
3. Shell Programming and Scripting
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
4. OS X (Apple)
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. 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...
I would like to use the grep search to search, line by line, for... (8 Replies)
Discussion started by: blackvelvet
6. Shell Programming and Scripting
Hi everyone, thank you so much for reading.
I built a user reference page from /etc/password for a class project. Now I need two shell scripts: 1) Add names to the reference page 2) Delete names from the reference page. I know grep -v is involved somehow and some piping but I am super stuck.
... (1 Reply)
Discussion started by: jsmpdx
7. Shell Programming and Scripting
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
8. UNIX for Dummies Questions & Answers
Hi there, I'm new to unix-environments.
I'm richard, and i'm mostly a web-developer, under php. I've done work in unix env before, but never had my own.
Today, I've got debian 3.1 r4 from the official site, and i've attempted to install it twice.
I installed it initially as "Desktop... (0 Replies)
Discussion started by: izua
I'm not sure where to post this but it's happening on a SunOS 5.8 server so I'll try here.
I've discovered some unexpected behavior when using tr.
echo a | tr
echo b | tr
echo a | tr
echo a | tr
echo a | tr
A (8 Replies)
Discussion started by: Mike@Work
10. Shell Programming and Scripting
I have a file with certain columns from ls -lR which looks something like:
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