[Wtr-general] not able to get url as String from file

Raj Kumar rajkumarmeena09 at yahoo.in
Tue May 12 03:07:49 EDT 2009


Hi

I am trying get an url from from file (sslvpn_host_name.txt) which is sslvpn.blr.novell.com and tyring to make it as
"http://sslvpn.blr.novell.com:8080/sslvpn/login" by concatenating of String.

my scripts is here:

begin
system("echo #{Time.now}:url from /root/sslvpn_host_name.txt  >> sslvpnconn.log") 

ssl_url_File="/root/sslvpn_host_name.txt" 
f=File.open(ssl_url_File) 
String url ="full_url_of_sslvpn_server" 
File.open(ssl_url_File).each { |line| 
  url=line }

puts url
full_url = "http://"+url+":8080/sslvpn/login"
puts full_url  ### <---Output want here

rescue
system("echo #{Time.now}:: create sslvpn_host_name.txt.Only ssl-url in it. >> sslvpnconn.log")
exit 0
end
But my output is coming correct up http://sslvpn.blr.novell.com only
but   :8080/sslvpn/login  is coming in next line.
I tried a lots but it fails. I think some problem in colon(:)
I want full url in single line as

"http://sslvpn.blr.novell.com:8080/sslvpn/login"

Please help me out.
Thanks
RAJ



      Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wtr-general/attachments/20090512/48bf9779/attachment.html>


More information about the Wtr-general mailing list