Ehsan suggested on 02 Jan 2011 to write the code for a sort of automatical switch between different OS. In my case, I have on my computer Windows and Ubuntu 10.04 Linux, so I have replaced the line
perlCmd = sprintf('"%s"',fullfile(matlabroot, 'sys\perl\win32\bin\perl'));
with
if findstr('glnx',lower(computer))
perlCmd = sprintf('"%s"',fullfile('/usr/bin/perl'));
else %assume it's windows otherwise
perlCmd = sprintf('"%s"',fullfile(matlabroot, 'sys\perl\win32\bin\perl'));
end
I have only tested on Ubuntu 10.04 Linux, with positive results on a 240 MB file. It works like a charm and very fast.
Hello everybody!
Could somebody give me some help with this file? Perhaps and example or something like that. I am running the function with the text I want to replace but is says that there are no matches for my search. Also, does the format has to be a .bak file or could it be a .txt?
Thanks in advance for your help!
Works great.
Just one suggestion, in case of calling the function with filenames without a full path the call fails if these files are not in the system path. How about adding support to this case by identifying it and building the path using "which" function?
Thanks for the submission.
Comment only