![]() |
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 |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing a variables value from the called script to calling script using ksh | rajarkumar | Shell Programming and Scripting | 10 | 12-23-2008 02:51 AM |
| problem accessing Multiple Variables from C Program to a Shell script | sameworld1980 | Shell Programming and Scripting | 1 | 09-10-2008 04:56 PM |
| problem with environment variables | Naughtydj | SUN Solaris | 1 | 06-28-2008 05:27 AM |
| gdb problem viewing variables | rimon | HP-UX | 0 | 11-21-2007 05:35 AM |
| problem with variables | udi | Shell Programming and Scripting | 2 | 12-23-2001 02:14 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Problem in script when using variables
The AppName may be TCS/HCL/SCB.
For All the above 3 i ill have exported TCSDIR/HCLDIR/SCBDIR in .profile with some path. i'm cnstruct the path in script and trying to cd $VARIABLE, it shows "not found". Any solution for this....? Code:
> AppName="TCS"
> echo $AppName
TCS
> start_path="\$${AppName}DIR/src"
> echo $start_path
$TCSDIR/src
> cd $start_path
ksh: $TCSDIR/src: not found
> cd $TCSDIR/src
/tmp/TCS_TEMP/src>
|
|
||||
|
$TCSDIR is the env variable set in my .profile
so i'm creating that based on the input in my script. When i'm using that in script i'm getting issue. $TCSDIR is /tmp/TCS_TEMP which is exported in .profile |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|