Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using variables with nsrmm -S

Status
Not open for further replies.

mpezeur

MIS
Nov 7, 2002
123
US
Has anyone tried to use variables with the nsrmm -S command to change an SSID's browse and retention dates?
For example, the following works:

nsrmm -S 12345 -e "8 weeks" -w "4 weeks"

changes the retention policy to 8 weeks and 4 wks for browse for SSID 12345, but the following will result in error:

nsrmm -S 12345 -e $RETENT -w $BROWSE

I receive the error: nsrmm: invalid volume name `-w'
I tried this from command line as well as via a script. Has anyone successfully used variable substitution with the nsrmm -S command?
 
Sounds like your variables are not set.
If you do an echo $RETENT, what does it return?
You are using Unix aren't you, as variables work differently on Windoze.
 
Yes, I'm running Networker on AIX (UNIX). From the command line, while trying this, I'm set the $BROWSE and $RETENT to "1 month". I've also tried with ' instead of "; also tried "\"1 month\"". Any way, no luck. When I echo out the settings for each variable, I do get the desired results. Yet, no luck for the nsrmm command:

# export BROWSE="1 month"
# export RETENT="1 month"
# echo $BROWSE
1 month
# echo $RETENT
1 month
# nsrmm -S 349454849 -e $RETENT -w $BROWSE
nsrmm: invalid volume name `-w'
usage: nsrmm [-v | -q] [-s server] [-f device]
or nsrmm -l [-v | -q] [-s server] [-f device] [-myB]
[-e forever] [-c capacity] [-b pool] [-R | volume]
or nsrmm {-u | -j} [-v | -q] [-s server] [-y] [-f device | volume...]
or nsrmm -p [-v | -q] [-s server] [-f device]
or nsrmm -m [-v | -q] [-s server] [-f device] [-r] [volume]
or nsrmm {-d | -o mode} [-v | -q] [-s server] [-Py]
[-S ssid[/cloneid] | -V volid | volume...]
or nsrmm [-s server] -S ssid {-w browsetime | -e retentiontime}
 
use

nsrmm -S 349454849 -e "$RETENT" -w "$BROWSE"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top