2 Replies Latest reply on Dec 18, 2012 11:25 AM by afurman NameToUpdate

    NSH Scripting Primer

      Where can I find a Scripting Primer for NSH Scripting?  I would like to know more so I can take advantage of the tools in the system.


      I would specifically like to know how to code Perl to run and interpret commands issued within BBSA -- and are there any "gotchas" that I need to be aware of -- like the variables that allow the script to run that are set on the NSH job...


      Any help would be very much appreciated.



        • 1. NSH Scripting Primer

          There is no single guide or so AFAIK. Here are some pointers for you:-


          1. NSH is based on the ZSH, so with respect to the semantics and syntax, you can do eveyrhtng in NSH what you can do in ZSH.
          2. You can look at the NSH commands reference provided with BBSA documentation to look at various commands avaialble which you can make use of.
          3. For Perl - there is a module which comes with NSH called NSH.pm You will find information about  that in documentation as well. This perl module lets you do things in Perl and exposes NSH distributed API.The NSH Perl Module gives Perl programmers the ability to access remote files and commands. The NSH module acts as glue between Perl and the Network Shell core technology. The NSH module currently supports 45 calls which interface the corresponding Network Shell distributed API.
          4. Look at NSHScript and NSHScriptJOb in the BladeLogic user guide about how you can get your scripts executed as a job using the BladeLogic Appserver. This also supports the Perl type of scripts.
          • 2. Re: NSH Scripting Primer

            Looking for documentation on using NSH perl module. According to #3 in previous post its in BMC documentation - the only thing I can find in the documentation is how to install the module. Where's the documentation on the 45 API calls mentioned?