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 > Operating Systems > AIX
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-09-2008
gravy26 gravy26 is offline
Registered User
  
 

Join Date: Oct 2007
Location: Ct
Posts: 15
VI Substitution problem

I'm having a problem getting my variables to work in dishing out an RMC script.

The $1 works fine. $2 does not
Here's a portion of the script:

server=$1
filesystem1=$2
#
dsh -w $1 'mkcondition -c "/var space used" -s "Name == \"$2\"" -e "PercentTotUsed > 90" -d "An event will be generated when more than 90 percent" -E "PercentTotUsed < 85" -D "The event will be rearmed when the percent of the space used in the $2 directory falls below 85 percent." "$2 space 90% used"'
#
The cmd entered on the cmd line is

./mkcondition techserv /testfs1Here is the output
server=$1
filesystem1=$2
+ filesystem1=/testfs1
filesystem2=$3
+ filesystem2=
filesystem3=$4
+ filesystem3=
#
echo $2
+ echo /testfs1
/testfs1
#
dsh -w $1 'mkcondition -c "/var space used" -s "Name == \"$2\"" -e "PercentTotUsed > 90" -d "An event will be generated when more than 90 percent" -E "PercentTotUsed < 85" -D "The event will be rearmed when the percent of the space used in the $2 directory falls below 85 percent." "$2 space 90% used"'
+ dsh -w techserv mkcondition -c "/var space used" -s "Name == \"$2\"" -e "PercentTotUsed > 90" -d "An event will be generated when more than 90 percent" -E "PercentTotUsed < 85" -D "The event will be rearmed when the percent of the space used in the $2 directory falls below 85 percent." "$2 space 90% used"
#

Any suggestions would be greatly appreciated. __._