Congrat! good script.
Only i have one question. how to use this script with multiples files? For example i have a several files in format txt in one directory, like: 31.txt, 32.txt, 33.txt... etc
there is a way to use this script for change in all the files the commas ',' to points '.'?
Thanks in advance for your help!
I had trouble replacing some trouble when the string I wanted to replace had '.' symbol. I am using MATLAB 2013b on Ubuntu 12.04 kernel 3.2.0-58-generic.
I ran the function like this:
This function worked correctly for one line of my file (the one I wanted to change):
sOpt.suffix = '.iq';
sOpt.suffix = '.buf';
The problem occurred for this line (which I did not want to change):
sOpt.datadir = 'iqdata/';
sOpt.datadir = .bufdata/';
I found I had no problems if I ran the function either of the following ways:
Maybe this is a trait of PERL, not sure. Thought I'd share on the off chance that anyone else runs into that problem.
Thanks for the code.
Works very well, I am using it to generate a batch of files from a single template. I am replacing two strings in a template and creating a file everytime. Is there a way to replace multiple strings in one shot?
The way I do it now is:
1. Open template, replace first string, save with new name.
2. Open new file, replace second string.