The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk computed variable names craig06y Shell Programming and Scripting 4 02-05-2008 09:50 AM
how to remove files with only numbers as file names? praveen_indramo Shell Programming and Scripting 6 06-07-2007 06:13 AM
Variable names Bab00shka UNIX for Dummies Questions & Answers 2 11-11-2005 07:45 AM
Variable assignment for file names. jagannatha UNIX for Dummies Questions & Answers 2 05-29-2003 01:38 PM
Variable names Bab00shka Shell Programming and Scripting 4 08-15-2002 08:00 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-08-2008
Registered User
 

Join Date: Aug 2008
Posts: 42
Stumble this Post!
Variable Names With Numbers

Hi Everyone,

I was just curious if you are allowed to begin a variable name with a number. For example, I would really like to have the variable 8DAY_AVERAGE. But my shell script only seems to allow EIGHTDAY_AVERAGE. Is there a way I can get the former to work? I am using bash. Thanks a lot!

Mike
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-08-2008
drl's Avatar
drl drl is offline
Registered User
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 505
Stumble this Post!
Hi.
Quote:
name A word consisting only of alphanumeric characters and under-
scores, and beginning with an alphabetic character or an under-
score. Also referred to as an identifier.
...
A parameter is an entity that stores values. It can be a name, a num-
ber, or one of the special characters listed below under Special Param-
eters. A variable is a parameter denoted by a name. A variable has a
value and zero or more attributes.

-- excerpts from man bash
The man pages are your friends ... cheers, drl
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0