The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 08-31-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
You need to put the variable inside single quotes when you print it. You think you did this but you didn't:

print "Buffer is : "${REC_BUF[CNF_REC_CNT]}""

First quoted string:"Buffer is : "
Unquoted string: ${REC_BUF[CNF_REC_CNT]}
Second quoted string: ""

Maybe you wanted:
print "Buffer is : \"${REC_BUF[CNF_REC_CNT]}\""
which is now a single quoted string.