Networker

Re: [Networker] nsradmin with shell script

2013-06-14 06:48:12
Subject: Re: [Networker] nsradmin with shell script
From: Conrad Macina <cmacina AT NAC DOT NET>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 14 Jun 2013 06:41:04 -0400
Thierry is correct, but his example may be a bit more complex than necessary. I 
think something like this would also work:

echo "show name;client id \n print type:nsrclient;Storage Nodes:xxxxx") | 
nsradmin -i  - | while read LINE
do
  echo "$LINE" >> /tmp/clientlist
done

The key to both solutions is that the read function re-combines continuation 
lines.

<Prev in Thread] Current Thread [Next in Thread>