![]() |
|
|
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 |
| How to assign a variable value to array? | balamv | Shell Programming and Scripting | 2 | 06-06-2008 04:33 AM |
| creating a variable | rexmabry | UNIX for Dummies Questions & Answers | 3 | 02-22-2008 03:30 PM |
| Array help (variable substitution). | dsimpg1 | Shell Programming and Scripting | 3 | 04-11-2007 05:38 PM |
| AWK program with array variable | whatisthis | Shell Programming and Scripting | 4 | 05-18-2005 12:07 PM |
| creating a dynamic array in ksh | gundu | Shell Programming and Scripting | 3 | 03-09-2005 03:26 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
creating array variable
Hi all,
i am quite fimiliar with shell scripting but i wouldn't regard myself as a semi professional at it. I am trying to create an array variable to read in 4 lines from a file using head and tail command in a pipeline and store each line into each array. I have done the scripting in unix but for some reason i keep getting syntax errors during runtime saying 'mon=' unexpected. for the moment i am trying to create a simple script to store months Jan, Feb Mar Apr into array mon but its not having it and i don't know why. i did google searches and i tried a number of the examples i found but none work i tried to use declare -a mon but it says "declare: not found" - is it something to do with the first line - #!/bin/bash? #!/bin/bash mon=( Jan Feb Mar Apr ) echo $mon can someone please throw some light onto this becuase its doing my head in. thanks in advance Mani |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|