
Solved!
Go to SolutionDR
DavidHampson-rY
1 Rookie
•
294 Posts
0
7191
May 30th, 2012 09:00
nsradmin from command line
I need a little help with my syntax it seems!
I have a list of servers I am trying to gather some info from, however the script I am using does not seem to return any data (I am executing this from one line as I don't have rights to run shell scripts on our backup server! However to make it clearer I have simply removed the ";" character which I put between lines):
cat /tmp/saphosts|while read -r hostname
do
echo "show name;group;scheduled backup;schedule;save set\nprint type:NSR client;name:$hostname">/tmp/nsradminsap
nsradmin -i /tmp/nsradminsap && rm /tmp/nsradminsap
echo "----------------"
done
If I go into nsradmin and run the commands from the command line substituting $hostname for a known clientname it returns the data I would expect:
nsradmin> show name;group;scheduled backup;schedule;save set
nsradmin> print type:NSR client;name:xxx
name: xxx;
scheduled backup: Enabled;
schedule: Full Monday;
group: FS_UX_PR_WY_MO_1930;
save set: All;
nsradmin>
Anyone able to suggest where I am going wrong!?
Responses (0)
Solutions (0)
