Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | The 'replace.tcl' tool should use Unix line-endings. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
50de96314f75494dc1f5b14d62c595a7 |
User & Date: | mistachkin 2016-08-02 19:29:56.543 |
Context
2016-08-02
| ||
20:42 | Fix a unused variable that comes up with -DSQLITE_OMIT_DATETIME_FUNCS. (check-in: e2f9919e34 user: drh tags: trunk) | |
19:29 | The 'replace.tcl' tool should use Unix line-endings. (check-in: 50de96314f user: mistachkin tags: trunk) | |
13:26 | Updates to requirements marks. No changes to code. (check-in: b23c10ac8f user: drh tags: trunk) | |
Changes
Changes to tool/replace.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/tcl # # Replace string with another string -OR- include # only lines successfully modified with a regular # expression. # set mode [string tolower [lindex $argv 0]] set from [lindex $argv 1] set to [lindex $argv 2] if {$mode ni [list exact regsub include]} {exit 1} if {[string length $from]==0} {exit 2} while {![eof stdin]} { set line [gets stdin] | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #!/usr/bin/tcl # # Replace string with another string -OR- include # only lines successfully modified with a regular # expression. # fconfigure stdout -translation binary -encoding binary fconfigure stderr -translation binary -encoding binary set mode [string tolower [lindex $argv 0]] set from [lindex $argv 1] set to [lindex $argv 2] if {$mode ni [list exact regsub include]} {exit 1} if {[string length $from]==0} {exit 2} while {![eof stdin]} { set line [gets stdin] |
︙ | ︙ |