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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tix/] [tools/] [tcltrim] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/usr/local/bin/tclsh
2
 
3
foreach source $argv {
4
    set target [file rootname $source].tt
5
 
6
    set src [open $source RDONLY]
7
    set tgt [open $target {RDWR CREAT TRUNC}]
8
 
9
    while {[eof $src] == 0} {
10
        set line [string trim [gets $src]]
11
 
12
        if {$line == ""} {
13
            continue
14
        }
15
        if {[string index $line 0] == "#"} {
16
            continue
17
        }
18
        puts $tgt $line
19
    }
20
 
21
    close $src
22
    close $tgt
23
}
24
 

powered by: WebSVN 2.1.0

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