The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
check position of end of line(URGENT PLS) evvander Shell Programming and Scripting 6 11-11-2007 05:46 PM
(URGENT) Mounting JFS2 FileSystem on AIX 4.3 aldowsary AIX 3 02-06-2007 04:50 AM
Creating a shell script to check filesystem space heprox AIX 10 06-18-2006 10:07 PM
Script to check for a file, check for 2hrs. then quit mmarsh UNIX for Dummies Questions & Answers 2 09-16-2005 02:46 PM
SCIO Unix Filesystem type - Urgent budrito Filesystems, Disks and Memory 2 08-28-2002 12:16 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-25-2008
Openware Openware is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1
Urgent:FileSystem Check Script

This script monitors a FileSystem named /Monthly and send a page; works great but I need to monitor /Daily/All ....Im getting Syntax Error

MSG=`df -Ik|awk '$6~/Monthly$/{gsub("%"," ");
if ($5>20){print "FS:Monthly filesystem is "$5"%"}}'`
if [ "$MSG" != "" ]
then echo $MSG | mail 2149724690@mobilecomm.net
fi
-------------------------------------------------------------
I need to check another filesystem called /Daily/All

Thanks for your help
  #2 (permalink)  
Old 04-25-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
The slashes around Monthly are the regular expression separator in awk; to specify a regular expression containing literal slashes, you need to backslash them.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0