Subversion Repositories OpenARM Single-board Computer

Rev

Blame | Last modification | View Log | Download | RSS feed

#!/bin/sh
awk '
        BEGIN {
                FS="[   \[\]]+"
                split("A B C D E F G H J K L M N P R T U V W Y AA AB AC AD", ROW, " ")  
        }
        /Pad/ {
                x=int(($3-984)/1968)
                y=int(($4-984)/1968)
                $11 = "\"" ROW[y] x "\""
                $2=" Pad["
                print $0 "]"
                next
        }
        
        {
                print $0
        }
' | sed "s/\[ /[/g;s/ ]/]/g"