[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] (j)ruby question to the experts
- Subject: [ale] (j)ruby question to the experts
- From: savithari at gmail.com (Narahari 'n' Savitha)
- Date: Tue, 20 May 2014 12:17:04 -0400
Friends:
I have a html file on my box that looks like
<table id="${id}_pushbutton">
...
...
...
...
</table>
<div id="${id}_background" />
When I run them to the following code
Dir.glob(fileTypes) do |theFile|
puts theFile
data=File.read(theFile)
puts data
#output_of_gsub=data.gsub(/::STATIC_TAG_WITH_VER::/,
"$static_ver_with_tag")
#print data
#puts output_of_gsub
File.open("/tmp/cool.txt", "w") {|file| file.puts data}
end
end
The output I see is strange
The output looks like
id="com.adp.pid:configuration:jar:2.2-SNAPSHOT_toolbar_buttons"
so essentilly the ${id} is getting interpreted either by the read or by the
puts.
Any suggestion on how to read without interpreting ${id} please ?
-Narahari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20140520/43ab0244/attachment.html>