All pastes #501440 Raw Edit

Something

public text v1 · immutable
·published 2007-05-22 01:50 UTC
rendered paste body
{
        if(0 != match($1, ".:"))
        {
        directory = ""
        }

        if(0 != match($1, "./"))
        {
        directory = substr($1, 2, length-2) "/"
        }

        if(($0 !~ /^$/) && ($1 !~ "total") && (0 == match($1, "./")) && (0 == match($1, ".:"))) {
        file=""
        for(i = 9; i<=NF; i++)
        {
                file = file $i " "
        }
        print substr($1, 1, 4) " " substr($1, 5, 3) " " substr($1, 8, 3) " " $3 " " $4 " " directory file
        }
}