If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Alias for a word with $ symbol

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-06, 16:28
deltacorvi deltacorvi is offline
Registered User
 
Join Date: Sep 2004
Posts: 9
Alias for a word with $ symbol

Hello,

Is there a way to define a variable name for a word with $ symbol in it?
For eg. sample_name = "sam$ple"

Thanks

Last edited by deltacorvi; 03-03-06 at 16:37.
Reply With Quote
  #2 (permalink)  
Old 03-04-06, 17:03
hyperbole hyperbole is offline
Registered User
 
Join Date: Jan 2006
Posts: 32
I assume you are saying you want to store the characters "sam$ple" in the variable sample_name.

Do that with
# sample_name="sam\$ple"
Reply With Quote
  #3 (permalink)  
Old 03-05-06, 04:55
bhaizone bhaizone is offline
Registered User
 
Join Date: Feb 2006
Posts: 31
OR

you can use
sample_name='sam$ple'
Reply With Quote
  #4 (permalink)  
Old 03-07-06, 14:07
deltacorvi deltacorvi is offline
Registered User
 
Join Date: Sep 2004
Posts: 9
Thanks! That worked.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On