general/misc/SSW/
file_str_replace.pro
Routines
top source file_str_replace
file_str_replace, file_in, string_in, string_out, out_filename=out_filename, no_svn=no_svn, move_it=move_it, _extra=_extra
NAME: file_str_replace PURPOSE: read a file, find a substring and replace it in an SVN working copy using str_replace function. Only do this for files with '.txt', '.pro' extensions. CALLING SEQUENCE: file_str_replace, file, string, replacement, out_filename=out_filename INPUT: file = a filename, note that the file will be rewritten unless the out_filename is set string = a string to replace, can be a vector replacement = the replacement string, can be a vector, with the same number of elements as the other string. KEYWORDS: out_filename = if set, then write to this file if not set, svn cp the original file to the output file prior to replacement. In this case the string in will be replaced in the filename by the new string, if present. no_svn = if set, do the string replacement to the output filename, but don't mess with svn. move_it = if set, use svn mv, and not svn cp HISTORY: 1-aug-2013, jmm, jimm@ssl.berkeley.edu
Parameters
- file_in
- string_in
- string_out
Keywords
- out_filename
- no_svn
- move_it
- _extra
File attributes
Modification date: | Thu Feb 13 16:43:43 2014 |
Lines: | 83 |