Anonymous user
Globally replace text in several files: Difference between revisions
Globally replace text in several files (view source)
Revision as of 06:06, 22 November 2010
, 13 years ago→{{header|Python}}: Newly created.
(Added PicoLisp) |
(→{{header|Python}}: Newly created.) |
||
Line 59:
GRTISF(Xyz$(), "Goodbye London", "Hello New York")</pre>
=={{header|Python}}==
From [http://docs.python.org/library/fileinput.html Python docs]. (Note: in-place editing is not supported on Windows 8.3 operating systems).
<lang python>import fileinput
for line in fileinput.input(inplace=True):
print(line.replace('Goodbye London!', 'Hello New York!'), end='')
</lang>
=={{header|Tcl}}==
|