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
Made a file called assignment1.sh and this is what's inside -
$ cut -c 2 sales.txt > regionalsales.txt
$ cut -c 6 sales.txt > regionalsales.txt
$ cut -c 1 territory.txt > terrsummary.txt
$ cut -c 2 territory.txt > terrsummary.txt
$ cut -c 3 territory.txt > terrsummary.txt
$ sort... (1 Reply)
Discussion started by: htzdruk
4. 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
So I have Ubuntu running on a sheevaplug develop kit, but the damn kernel thing doesn't come with /dev/tun enabled. It was suggested that I look into using module assistant to compile & get this set up but I'm having issues.
Linux ubuntu 18.104.22.168 #2 PREEMPT Fri Aug 5 19:05:11 MDT 2011 armv5tel... (4 Replies)
Discussion started by: dpreviti
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. UNIX for Dummies Questions & Answers
ls -1 $spath > list
while read list
newlist=`echo $list | sed 's/.gz//' `
newnewlist=`echo $newlist | sed 's/.fastq//' `
c=$(($c+1)) (6 Replies)
Discussion started by: analyst
8. Shell Programming and Scripting
Whats the wrong with the following code:
if ; then
echo "File XYZ Exist"
if ] ; then
echo "File abc is not empty, script continues"
echo "File abc is empty, script aborts"
echo "File XYZ does not exist"
Error: testscript.ksh:... (3 Replies)
Discussion started by: karumudi7
9. 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
10. UNIX for Dummies Questions & Answers
I have a file with 1800+ lines and all are something like this:
drwx--x--x 12960 4096 Oct 6 2006 palfvoet
drwx--x--x 67205 4096 May 9 05:21 pallsopp
drwx--x--x palmgren 4096 Oct 6 2006 palmgren
now, as you... (3 Replies)
Discussion started by: besgal