LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-14-2005, 04:17 PM   #1
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 252

Rep: Reputation: 30
BASH Script: variable values referencing for console arguments


My script eventually comes up with a positive integer value for a varaible
called REVISION_NUMBER.

I need to have the integer value of this variable then used to call
the console input argument of the same value. For example, say
REVISION_NUMBER = 2. I want to use it to make the call $2, so I can
get the 2nd console input argument.
 
Old 11-14-2005, 05:23 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
${!REVISION_NUMBER}
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
sed doesn't accept $variable in bash script chii-chan Programming 6 05-28-2005 07:07 AM
Bash Script Passing variable to Function nutthick Programming 2 02-02-2005 05:15 AM
bash script $n variable expansion cortez Programming 6 12-08-2003 04:03 PM
Bash script renaming a variable zael Programming 3 09-30-2003 04:37 AM
bash - comparing a variable to several values davee Programming 3 05-05-2003 07:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration