Comment detail

条件を満たす行を取り除く (Nested Flatten)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
def inputfile = new File("c:/in.txt")
def outputfile = new File("c:/out.txt")

def buffer = []
inputfile.eachLine{
    if( !(it ==~ /^\s*#.*/) )
        buffer << it
}

outputfile.write( buffer.join("\n") )

Index

Feed

Other

Link

Pathtraq

loading...