From: Bill Kelly Date: 2005-08-09T10:32:02+09:00 Subject: Re: One line handies From: "William James" > > Bill Kelly wrote: > > DOS (cmd.exe) will need the double- and single-quotes swapped: > > > > ruby -e "puts ENV['PATH'].downcase.split(/[:;]/).sort" > > Did you try it without swapping the quotes? > > Unlike awk, mawk, and gawk, Ruby under DOS accepts single quotes as > argument wrappers. However, if the string contains |, <, or >, then > you had better use double quotes. Whoa... ! Thanks. Makes me wonder if that always been true, even back when the standard Ruby distribution for windows was cygwin based? Or maybe I got so accustomed to perl -e 'print "huzzah\n"' Can't find string terminator "'" anywhere before EOF at -e line 1. I never tried it on ruby! Thanks, Regards, Bill