![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| get_source[34]: 0403-057 Syntax error at line 66 : `"' is not matched. | vishal_ranjan | Shell Programming and Scripting | 1 | 05-15-2008 07:48 AM |
| I got error like...syntax error on line 1, teletype | koti_rama | UNIX for Advanced & Expert Users | 2 | 07-07-2007 08:35 PM |
| getting error 0403-016 Cannot find or open the file while reading a long line | karthee | Shell Programming and Scripting | 2 | 06-05-2005 01:00 AM |
| sh: syntax error at line 1: `>' unexpected | atiato | High Level Programming | 2 | 03-16-2004 07:39 AM |
| syntax error on line 1, teletype | KokoPops | Shell Programming and Scripting | 1 | 07-07-2002 10:33 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi All,
I got a script from one of the unix forums for reporting on filesystem usage and wanted to use it but it keeps giving me the following error. 0403-057 Syntax error at line 70 The script is shown below. Pls help as I am new to UNIX. # set -x # D I S K S P A C E . S H # # 07/02/96 # # Checks available disk space against a reference table, # and flags the filesystems that are below their limit. # # 10/12/94 Original Version # 03/06/96 Minor modifications for HP/UX 10.0 # 07/02/96 Fixes to handle multi-line df -k lines better TABLE=/home/ora9/scripts/diskspace.tab BOLD=`tput smso` NORM=`tput rmso` if [ ! -f $TABLE ] then TABLE=/home/ora9/scripts/diskspace.tab echo "Using Table file : "$TABLE fi echo "\n\n\n% Used\tWarn\tFilesystem Name\t\t\tCURRENT DISKSPACE STATUS" echo---" df -k | while read LINE do set x ${LINE} if [ -n "$3" ] # If $3 is null, suspect multiline fs then shift 5 else read LINE set x ${LINE} shift 4 fi if [ -n "$1" -a "$1" != "used" ] then PERCENT=`echo $1 | tr -d '%'` FILESYSTEM=$2 set x `grep "^${FILESYSTEM} " ${TABLE}` # tab aftr FS if [ -z "$3" ] then continue fi MAX=$3 ALARM=$4 if [ -z "$4" ] then ALARM=100 fi if [ ${PERCENT} -gt $MAX ] then HDR=${BOLD} TRL=${NORM} if [ ${PERCENT} -gt $ALARM ] then TRL="$TRL\t\t\t\t*** CRITICAL ***" else TRL="$TRL\t\t\t\t*** WARNING ***" fi else HDR="" TRL="" fi echo "${PERCENT}%\t(${MAX}%)\t${HDR}${FILESYSTEM}${TRL}" fi done echo "\n" exit 0 --------End of DISKSPACE.SH Thanks T |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|