The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



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
Sed variable substitution when variable constructed of a directory path alrinno Shell Programming and Scripting 2 07-11-2008 03:24 PM
Enviornment Variable in B shell (I call it nested variable) princelinux Shell Programming and Scripting 4 07-02-2008 02:35 AM
usage of same variable in multiple scripts risshanth UNIX for Dummies Questions & Answers 1 07-01-2008 01:03 PM
CPU usage and memory usage mansoorulhaq High Level Programming 1 08-09-2007 05:55 PM
Monitor CPU usage and Memory Usage Gajanad Bihani High Level Programming 2 03-09-2005 07:35 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 08-25-2008
shreekrishnagd shreekrishnagd is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 22
Usage of $ as variable name

Hi I have to use a Environment variable and that variable has $ prefixed to its name like,
$var=/home/source/test/
i need to use the variable as i have show above.
Help requested..... Thanks in advance...
  #2 (permalink)  
Old 08-25-2008
redoubtable redoubtable is offline
Registered User
  
 

Join Date: Aug 2008
Location: Portugal
Posts: 242
Code:
var=/home/source/test
echo $var
Can't you use it like this?
  #3 (permalink)  
Old 08-25-2008
shreekrishnagd shreekrishnagd is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 22
Mr. redoubtable

Actually my variable is $var can you help me using this
  #4 (permalink)  
Old 08-25-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
Quote:
Originally Posted by shreekrishnagd View Post
Actually my variable is $var can you help me using this
this seems like a problem in understanthing.
if im not mistaken, in bash, the varaible is called "var"
the $ at the begining is a way to call teh contents of it. when you set the var, you do this
var="some content"
when you cant to use that var you use
echo $var
or
touch file.$var
  #5 (permalink)  
Old 08-25-2008
redoubtable redoubtable is offline
Registered User
  
 

Join Date: Aug 2008
Location: Portugal
Posts: 242
Are you talking about bash? 'Cause bash will fail if you use that syntax. I'm not such I understand the problem. If it is an environment variable, can you see it when you type export in the terminal?
  #6 (permalink)  
Old 08-25-2008
shreekrishnagd shreekrishnagd is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 22
passing to Datastage

actually that is being passed into datastage job as environment varible
  #7 (permalink)  
Old 08-25-2008
redoubtable redoubtable is offline
Registered User
  
 

Join Date: Aug 2008
Location: Portugal
Posts: 242
I found a blog talking about your problem: datastage.

If this does not help you, wait for more replies 'cause I'm not familiar with datastage.
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 12:17 AM.


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