in this code, we change in all IDL *.pro files, the path ../DATA onto a variable named data_toolbox.
For more precisions, the occurence '../DATA is replaced by data_toolbox+'
Here is the code :
[pene@donunix] perl -p -i.bak -e "s|\'\.\./DATA|toolbox_data+\'|g" *.pro
NB : Before making the changes, perl create a copy of the IDL files with the extension .bak.
transform a path onto a variable in a list of files
tags :
files and directories,
IDL,
perl,
regular expression,
shell-script
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment