transform a path onto a variable in a list of files

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.

No comments: