![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assign Values to variables from a text file | sarsani | Shell Programming and Scripting | 3 | 06-26-2009 07:05 PM |
| Awk/shell question: Read from file and assign to variables. | akbar | Shell Programming and Scripting | 3 | 05-07-2008 06:10 PM |
| how do u assign the values to different variables when it is presneted in one line?? | SwetaShah | High Level Programming | 2 | 10-24-2005 09:56 PM |
| Assign variables with cut | douknownam | Shell Programming and Scripting | 2 | 09-27-2004 09:18 AM |
| declare, assign variables using array, counter, loop | egkumpe | Shell Programming and Scripting | 3 | 08-09-2004 10:56 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Assign script parameters to variables
Hi,
I have a bash script that accepts some parameters as input, like: sh script.sh first second third ..... I want to save these parameters as different variables, something like: VAR1=first VAR2=second etc I tried this, but apparently it didn't worked.... ------------------------------ for ((i=1;i<=$#;i=i+1)) do VAR${i} = $"${i}" done ------------------------------ I hope I made myself clear.... Thank you in advance. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|