[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: -e oneliners with File.open
From:       Tobias Reif <tobiasreif () pinkjuice ! com>
Date:       2002-05-22 17:30:43
[Download RAW message or body]

Jason Voegele wrote:


> Try swapping the single and double quotes.


works, thx :)

(the aposes need to be escaped for the newline)

ruby -e "open('foo.txt','w') do |f| f.write((('x'*10)+\"\n\")*100) end"

> Also, you don't need the 
> semicolons.


I know; I just wanted to be friendly to Ruby since it was choking :)


Tobi


-- 
http://www.pinkjuice.com/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic