Try putting 1&2 in quotes "1&2".  & | < > are used by the terminal.

Becker

On Fri, Apr 11, 2008 at 4:04 PM, Kwong Goh <kagohaik85 / hotmail.com> wrote:
> I am using optionparser to take in arguement. However, it seems like the
>  option parser does not accept "&" "|" "<" ">" as the arguement when they
>  are entered from the command line.
>
>  For example, I use opts.on("-d option"), when I enter -d 1&2 in the
>  command line, it will only accept 1 in this case.
>
>  May I know what is the reason for this and how to solve this problem?
>
>  Thanks.
>  --
>  Posted via http://www.ruby-forum.com/.
>
>