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 -->
  #1 (permalink)  
Old 07-03-2009
meny meny is offline
Registered User
  
 

Join Date: Jul 2009
Location: Israel
Posts: 5
new local variable in bash

hi,
i need to add a new local variable to my script.
then i want to display its value along the title(with echo).

desired result:
password = x

Actual result:
x

for some reason the below line displays the x value.

password=cat config.xml |grep 'DB Password'|cut -f3 -d '='|cut -f2 -d '"'


why is it that when i run the script it display the new variable & how can i avoid it value?
thanks...