Skip to content

Instantly share code, notes, and snippets.

Created March 29, 2016 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1be62b4d39e286c9fac9 to your computer and use it in GitHub Desktop.
Save anonymous/1be62b4d39e286c9fac9 to your computer and use it in GitHub Desktop.
File.write("ex15_sample.txt", File.open("ex15_sample.txt", &:read).gsub("@tags", "@rtag"))
puts "How many tags you want to use? "
n = gets.chomp
for i in 0...n.to_i
puts "Enter the name of tags"
tags = gets.chomp
puts "Enter the name of tags which you want to get replaced"
rtag = gets.chomp
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment