6 Replies Latest reply on Apr 17, 2013 6:47 PM by Bill Robinson

    Space treated as new line

    Abin Mammala

      Hello,

       

      I have a job that take values from a text file. The first line in the text file is:

       

      TPS--EAR--DEV01--DEV02,/Abin Testing,/c/abin/reeja.txt,

       

      However , when I run the following commands:

       

      blcred cred -acquire -profile prod -username BLAdmin -password xxxx

      blcli_setoption serviceProfileName prod

      blcli_setoption roleName BLAdmins

      blcli_connect

       

      Lines=`cat /c/template.txt`

      for line in $Lines

       

      do

        TEMPLATE_GROUP=`echo $line | awk -F"," '{print $2}'`

                echo $TEMPLATE_GROUP

       

      done

       

      it give the following answer:

       

      stlwladev01% nsh CreateTemplateAddConfigutationFile_01.nsh

      Authentication succeeded: acquired session credential

      /Abin

      stlwladev01%

       

       

      The issue heres is the space in the template group name (/Abin Testing).

       

      Is there a way so that, i get the following result:

       

      /Abin Testing

       

      I tried using the cut -d command as well. I strongly believe it is something to do with the way how it reads the value that contains a space.

       

      Thanks

      Abin