How to do bulk file-editing in common lisp? -


i'd know how bulk-editing of files in common lisp. needed while , used perl , bash it. i'd know common-lisp solution out of curiousity.

i used following:

find -name '*.lisp' -execdir perl -0777 -pi.bak -e 's/foo/bar/mi' '{}' '+' 

and worked charm.

the above command feeds files in directory (and subdirectories) perl program. perl program searches regex "foo" , replaces regex "bar", , saves new (edited) file in place.

thanks guidance can provide on cl solution.

how starting walk-directory, slurp file, close file, replace foo bar, write contents back, , then... rest. ;-)


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -