4 Replies Latest reply on Nov 26, 2014 1:06 PM by Steve Cupp

    Removing double quotes from a string with NSH

    Steve Cupp

      Code snipet:

      while IFS=, read -r serverName folderPath

      do #this will parse and read csv file content recursively.


          echo "this is the server name as read from the .csv file: $serverName"

          echo "this is the full folder path as read from the csv input file: $folderPath"


      So the values look like this after being read in:

      $serverName - "servername.xx.xxxxx.org"

      $folderPath -  "XAIRHMProd^Citrix_Admin^ZDC"


      I want the leading & trailing double quotes stripped off, everything else left the same using the same variable names

      Desired result:

      $serverName - servername.xx.xxxxx.org

      $folderPath -  XAIRHMProd^Citrix_Admin^ZDC


      Sounds easy enough, struggling how to do this in NSH. . . please help. . .