Problem with $ in Shell Script

  • aush_001
  • Born
  • Born
  • aush_001
  • Posts: 1

Post 3+ Months Ago

Hi All,

In shell script, i have a problem on referencing some parameter.

Can you look at the following code.


FCP_DATA_PATH=$5;
cd $FCP_DATA_PATH

earlier this parameter value was " \xx\xx\somepath"

But now this path is changed to "$USF_TOP/contracts"

When i referering this parameter using

'cd $FCP_DATA_PATH'
it is taking as 'cd $$USF_TOP/contracts' and due to this im unable go to that particular directory.


Can any one of you suggest me on this.


Thank you,
Rajesh
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • thevali
  • Newbie
  • Newbie
  • thevali
  • Posts: 10

Post 3+ Months Ago

Hi,
can you be more explicit? maybe you should paste the code.
Usually if you have:
a=/var
b=${a}/log

You should be able to run cd $b and go to /var/log

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 74 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.