From: Stu Date: 2010-11-29T10:30:17+09:00 Subject: Re: How to use Ruby like shell script? Right on. looks like String#split will take regular expressions. This is one deals with white space issues by splitting on the newline char \n in filenames: x = `ls`.split(/\n/) On Sun, Nov 28, 2010 at 7:05 PM, Oliver Schad wrote: > Stu wrote: > >> lol I just figured out one way to make your ls command into an array. >> in a single line. >> >> x = `ls`.split >> >> or >> >> x = `echo *`.split > > That's not a good idea. File names can contain white space, line breaks > and many more fuckup. > > Regards > Oli > > -- > Man darf ruhig intelligent sein, man muss sich nur zu helfen wissen > >