D
div n
Tried the following script on MAC os using ruby , but i get the following error
#$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..')
#$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')
require 'rubygems'
require 'yajl'
require 'json-compare'
files = Dir.glob("../Downloads/Emailing__a/b.json")
@original_string_or_regex = "\""
@replacement_string = """
text = File.read(files)
puts = text.gsub(/@original_string_or_regex/, @replacement_string)
File.open(filename, 'rw') { |file| file << puts }
but i get the following error.
unterminated string meets end of file
can anyone suggest on how to fix this?
#$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../..')
#$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')
require 'rubygems'
require 'yajl'
require 'json-compare'
files = Dir.glob("../Downloads/Emailing__a/b.json")
@original_string_or_regex = "\""
@replacement_string = """
text = File.read(files)
puts = text.gsub(/@original_string_or_regex/, @replacement_string)
File.open(filename, 'rw') { |file| file << puts }
but i get the following error.
unterminated string meets end of file
can anyone suggest on how to fix this?