From: Tim Hunter Date: 2008-04-12T08:10:08+09:00 Subject: Re: Need help in option parser Kwong Goh 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. Depends on what O/S and shell you're using. In most Linux shells those characters are interpreted by the shell. In Windows both < and > are interpreted by cmd.com. I don't know about the others. You can make the shell ignore those characters by surrounding them with quotes or escaping them with an acceptable escape character such as a backslash. -- RMagick: http://rmagick.rubyforge.org/ RMagick 2: http://rmagick.rubyforge.org/rmagick2.html