![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| error in running shell script in cron | sari | Shell Programming and Scripting | 3 | 04-16-2008 01:09 AM |
| When running if condition, getting the following error | sunitachoudhury | Shell Programming and Scripting | 1 | 04-05-2008 11:31 PM |
| Error while running rsh commands !!! | csaha | Shell Programming and Scripting | 3 | 11-07-2006 09:47 PM |
| Error in running on AIX 5.2 | SMISS | AIX | 0 | 06-24-2004 08:06 AM |
| Error while running a script | HarryTellegen | UNIX for Dummies Questions & Answers | 5 | 02-04-2002 10:58 PM |
|
|
LinkBack | Thread Tools | 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 |
| Forum Sponsor | ||
|
|
|
|||
|
|
|||
| Google UNIX.COM |