![]() |
|
|
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 |
| error in running shell script in cron | sari | Shell Programming and Scripting | 3 | 04-16-2008 05:09 AM |
| When running if condition, getting the following error | sunitachoudhury | Shell Programming and Scripting | 1 | 04-06-2008 03:31 AM |
| Error while running rsh commands !!! | csaha | Shell Programming and Scripting | 3 | 11-08-2006 01:47 AM |
| Error in running on AIX 5.2 | SMISS | AIX | 0 | 06-24-2004 12:06 PM |
| Error while running a script | HarryTellegen | UNIX for Dummies Questions & Answers | 5 | 02-05-2002 02:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Error while running your script -- Balamv
When I run this, I am getting the below error. Why? Pls help me
#!/bin/ksh echo Hello World dirs="not_using_0" for entry in *; do [ -d "$entry" ] && dirs="$dirs $entry" done dirarray=($dirs) index=1 while [ -n "${dirarray[$index]}" ] ; do echo "${index}: ${dirarray[$index]}" index=`expr $index + 1` done while [ -z "$ans" ] ; do echo -n "Choose one -> " read ans [ -z "${dirarray[$ans]}" ] && echo "Invalid response; try again." done echo "Result is ${dirarray[$ans]}" Hello World arrayshell.sh: syntax error at line 7: `dirarray=' unexpected |
|
||||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|