Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

value of variable

Status
Not open for further replies.

meetramana

Programmer
Feb 2, 2005
57
US
How do I get the value of the variable/

Example:
The script is invoked as follows
script1 arg1 arg2 arg3

inside the script1:

intger numberofarguments=$#
echo $($numberofarguments)

I want to print out :
arg3

Thanks in advance
-Ramana
 
Code:
#!/bin/ksh

numberofarguments=$#
eval echo \$$numberofarguments

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top