The UNIX and Linux Forums  

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



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
How do i set environment variable ahjiefreak Linux 4 01-20-2008 08:21 PM
sed on an environment variable ? lumix Shell Programming and Scripting 3 12-15-2007 06:30 PM
Using Environment Variable kaiser Shell Programming and Scripting 3 05-01-2006 09:28 AM
set environment variable? kohoutek UNIX for Advanced & Expert Users 3 12-21-2005 05:23 PM
Environment Variable jacobsa UNIX for Dummies Questions & Answers 8 06-03-2002 04:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-04-2005
karyn1617 karyn1617 is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 10
Exclamation Environment Variable

First of all I am using C shell.

I have a variable destDirectory that holds a path.

the path includes an environment variable($user)

when I try to execute a command within the script, the $destDirectory gets replaced with the path, but the environment variable is not replaced. I end up with an error about an invalid path. Is there a way around this? How do I make it resolve the $user?
  #2 (permalink)  
Old 02-04-2005
encrypted's Avatar
encrypted encrypted is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2004
Location: Oslo, Norway
Posts: 219
Quote:
when I try to execute a command within the script, the $destDirectory gets replaced with the path, but the environment variable is not replaced
What code are you running i.e. what commands in the script etc.?
Have you tried exporting the variable in question ?
  #3 (permalink)  
Old 02-04-2005
karyn1617 karyn1617 is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 10
Nevermind, I got it

I figured it out, thanks!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0