On 3/13/07, Marcin Kulisz <marcin.kulisz / gmail.com> wrote:> hi all,> today is my first day with ruby and I'm trying to rewrite a few of my> scripts from perl to ruby & it's not too easy. can anyone help me with> script below. I've done a few thinks but when one is working another> don't.
#!/usr/bin/ruby -w
usr = ARGV[0]id = `cat /etc/passwd|grep #{usr}|cut -d\":\" -f3`.to_iif id>=1000    text=`finger #{usr}`    text.gsub!(/\n/, "<br>")    puts textelse    puts "wal sina ryj zĄ¦odzieju"end
alternatively you can do:    text=`finger #{usr}`.gsub(/\n/, "<br>")instead of those two lines.
puts appends \n, if you don't like it, use print