From: William James Date: 2005-08-09T10:16:09+09:00 Subject: Re: One line handies Bill Kelly wrote: > From: "David A. Black" > > Does this: > > > > ruby -e 'puts ENV["PATH"].downcase.split(/[:;]/).sort' > > > > not work on all platforms? Or are there quote/escaping issues? > > 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.