1 Reply Latest reply on Dec 13, 2015 10:55 AM by Bill Robinson

    NSH - Concatenate path/file using variables

    James Donohue



      I have some NSH scripts that use paths and filenames in defferent ways. I'm trying to get away from hard-coding these values since the scripts will be shared amongst various Teams. I've been working for hours on combining a <path> variable with a <filename> variable using everything I've read on the script sites (ZSH, BASH, NSH) with nothing but frustration. I need to break them up because I use only the path and only the filename in different parts of my script. Here's one example of using cat in one of my scripts:


      Script Parameters:

      DEPOT_INPUT_FILEPATH --> /Applications/Integration/Management Scripts/Update_GWIM_Properties

      DEPOT_INPUT_OBJECT_NAME --> HW.ServerInventory.csv


      Inline Script variable:



      cat "${DEPOT_INPUT_FULLNAME}" | while IFS="," read f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13


      . . . .

      . . . .


      Error is 'No such file or directory'