Search Results

Showing results 1 to 9 of 9
Search took 0.02 seconds.
Search: Posts Made By: Fest3er ; Forum: Shell Scripting and child forums
Forum: Shell Scripting May 12th, 2009
Replies: 8
Views: 843
Posted By Fest3er
Each of your -exec clauses needs to be terminated with an escaped semi-colon, as in:

find / -name \*JPG -exec chmod 644 {} \; -print


At least the shell and possibly find() are having...
Forum: Shell Scripting May 11th, 2009
Replies: 2
Views: 639
Posted By Fest3er
Weird, but it can be done.


CUST_1=filename
b=1
eval c=\$CUST_$b
echo $c


There may be easier ways to do what you mean, like using an array. But this works, and gets points for being...
Forum: Shell Scripting Mar 19th, 2009
Replies: 4
Views: 1,256
Posted By Fest3er
/usr/ucb/ps -auxxx | awk '{printf("%4s %4s %5s %4s %s\n", $3,$4,$2,$1,$11)}' | grep -v 0.0probably does what you really want: line up the columns. If you truly want the numbers to be %5.2f format,...
Forum: Shell Scripting Mar 11th, 2009
Replies: 16
Views: 5,802
Posted By Fest3er
Of course it won't work now. You changed the watchdog line in crontab from */5 * * * */opt/watchdog/startwatchdog.sh as you originally specified, to /5 * * * * /opt/watchdog/startupWatchdog.sh
You...
Forum: Shell Scripting Mar 11th, 2009
Replies: 16
Views: 5,802
Posted By Fest3er
Forty lashes with a wet noodle for me for posting the wrong thing. The code above should work now; I've reduced it to a single line. This time I actually tested them. :$

It appears you don't have...
Forum: Shell Scripting Jan 9th, 2009
Replies: 16
Views: 5,802
Posted By Fest3er
First, it assumes that the editor you are using to edit the crontab is vi(). If you've 'export EDITOR=vi' in the script, then this should be OK.

It is feeding vi() commands to the 'crontab -e'...
Forum: Shell Scripting Jan 9th, 2009
Replies: 16
Views: 5,802
Posted By Fest3er
The following should do the trick quite easily.

To comment out the line:
crontab -l >/tmp/crontab.a
sed -e 's=\(^.*/opt/watchdog/startwatchdog.sh$\)=#\1' /tmp/crontab.a | crontab
rm...
Forum: Shell Scripting Dec 12th, 2008
Replies: 6
Views: 1,366
Posted By Fest3er
bc(1) is your friend. It computes to arbitrary precision.

"-e" tells bash to interpret \x sequences; ksh might not need it.


.
.
.
integer read=`echo -e "scale=2\n$rBytes/1000000" |...
Forum: Shell Scripting Dec 4th, 2008
Replies: 10
Views: 2,449
Posted By Fest3er
The following may be closer to what you want:


lsof | grep QuarkXP \
| cut -c76- \
| sort | uniq \
| awk '{ printf("\"%s\"\n", $0)}' > /tmp/output1


The cut(1) deletes...
Showing results 1 to 9 of 9

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC