Same thing just happened to me today. I stuck the from domain, the relay domain and its IP address is my access list and my hosts.deny. I hate these bastards.
du -aDklS is Linux, perhaps? I'm running this under Solaris, so I use du -adko.
Anyway, running this under Solaris does not give the output of the system command:
#!/bin/sh
df -k | grep -v cdrom | grep -v : | sed 1d | sed 's#%##' | awk '
{
if ( $5 > 10 )
{
print "ALERT...
Grant, the awk portion of the script works fine and the du command I list also works, but I want to put them together and that is where it doesn't work. The $6 is a field containing the disk slice that I want to run du against.
Can I pass $6 to the system (du...) command?
Grant,
$PAGE_NUMBER and $MAIL_NUMBER are defined in the script (I'm only showing the serious part of the script). Anyway, I tried the below and it didn't execute the du command.
df -k | grep -v cdrom | grep -v : | sed 1d | sed 's#%##' | awk
'{
if ( $5 > '$PAGE_NUMBER' )
{
print...
How to get this to work? I want to execute a command on a field (du -adko $6 | sort -nr | head -10)...
df -k | grep -v cdrom | grep -v : | sed 1d | sed 's#%##' | awk '{ if ( $5 > '$PAGE_NUMBER' ) { print "ALERT: "$6 " is " $5 "% full on "} else if ( $5 >...
Well, I'm trying to parse a file that contains nodes on a site and then using lynx to make sure they are available. The problem is parsing the file and pulling information that I use to form a URL. I'll look into gawk, but if I could find some way of using the lynx_url, that would fix my issues.
I'm stuck trying to execute a command w/in an awk statement. I've pieced together a string with awk, but I need to execute the string as a command ($lynx_url). Suggestions?
#!/bin/sh
HOST=www.domain.com
HTTP=http://
LYNXCMD="/usr/local/bin/lynx"
LYNX="$LYNXCMD -dump -head"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.