-1

somebody knows what does this error mean? Missing -. in google I found nothing about this

lego69
  • 767
  • 1
  • 12
  • 20

1 Answers1

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