Can anyone tell me why I get a syntax error on the line
containing buf = STDIN.gets below?
Is there a ruby interpreter option that gives more detail on
syntax errors?
Peter Booth
require ‘net/http’
intHostname = “myhost”
intPort=18000
intPath="/home/"
uids = IO.readlines(“uids”)
currentUser = 0;
while true
puts "How many users to add?"
buf=""
buf = STDIN.gets
newUsers = buf.to_i
for i in 0...newUsers
uid = uids[currentUser]
headers = Hash.new
headers["Proxy-Remote-User"] = uid
h = Net::HTTP.new(intHostname,18000)
puts "Fetching page for user #{uid} count
#{currentUser}"
resp, data = h.get(intPath, headers)
puts "Got page for user #uid}: #{resp.message}"
currentUser++
end
end