OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [tools/] [tcltrim] - Rev 1765

Compare with Previous | Blame | View Log

#!/usr/local/bin/tclsh

foreach source $argv {
    set target [file rootname $source].tt

    set src [open $source RDONLY]
    set tgt [open $target {RDWR CREAT TRUNC}]

    while {[eof $src] == 0} {
        set line [string trim [gets $src]]

        if {$line == ""} {
            continue
        }
        if {[string index $line 0] == "#"} {
            continue
        }
        puts $tgt $line
    }

    close $src
    close $tgt
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.