somebody knows what does this error mean?
Missing -.
in google I found nothing about this
Asked
Active
Viewed 122 times
-1

lego69
- 767
- 1
- 12
- 20
-
I'm using C-Shell, I wrote some script, but can't run it cause have this error – lego69 Jun 02 '10 at 13:06
-
3There are quite few people with telepathy are here. Could you post your script listing? – nkrkv Jun 02 '10 at 13:10
-
are you still interested in resolving this? – shellter Mar 09 '11 at 20:40
1 Answers
2
The only case where tcsh can produce that error message is when you're trying to substitute a range of words from an array variable, and the selector is syntactically incorrect.
Quoting the tcsh man page:
$name[selector]
${name[selector]}
Substitutes only the selected words from the value of name.
The selector is subjected to `$' substitution and may consist
of a single number or two numbers separated by a `-'. The
first word of a variable's value is numbered `1'. If the first
number of a range is omitted it defaults to `1'. If the last
member of a range is omitted it defaults to `$#name'. The
selector `*' selects all words. It is not an error for a range
to be empty if the second argument is omitted or in range.
For example:
$ echo $path[5-6]
/usr/sbin /usr/bin
$ echo $path[5_6]
Missing -.
Perhaps if you had followed up when you were asked for more information (like, say, some code from the failing script), it wouldn't have taken over a year to get an answer.

Keith Thompson
- 254,901
- 44
- 429
- 631