![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Setting Environment Variable date | d3ck_tm | High Level Programming | 6 | 11-08-2006 06:33 AM |
| Solaris 8 setting up a remote printer queue | miredale | UNIX for Advanced & Expert Users | 0 | 09-12-2006 02:41 AM |
| problem in getting the path of environment variable set in bashrc in my shell script | krithika | Shell Programming and Scripting | 8 | 05-26-2006 08:19 AM |
| Retreiving environment variable from remote system | bschnair | UNIX for Dummies Questions & Answers | 0 | 04-04-2006 03:03 PM |
| Accessing remote machine via an enviroment variable | ElCaito | UNIX for Dummies Questions & Answers | 4 | 02-14-2006 09:04 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Setting environment variable on a remote solaris machine using shell script
Hi,
I am trying to set environment variable on a remote machine. I want to do it by running a shell script Here's what I am doin rsh <remote-hostname> -l root "cd /opt/newclient; . ./setp.sh" In setp.sh, I have ############################# cd ../newlib; export LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/java/jre/lib/i386/client:`pwd` cd ../newclient ############################# Output I am getting is sh: LD_LIBRARY_PATH=::/usr/lib:/usr/java/jre/lib/i386/client:/opt/newlib: is not an identifier Script is fine when I ran on a remote machine. . ./setp.sh Can someone what's wrong with it? Thanks, Sundeep Last edited by eamani_sun; 05-30-2008 at 05:19 PM.. |
|
||||
|
Yes, I know exactly what's wrong. When you're logged in, you're not using the bourne shell. You're using either bash or ksh. When you run the rsh command, the bourne shell is being used.
Your code needs to look like this: Code:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/java/jre/lib/i386/client:`pwd` export LD_LIBRARY_PATH |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|