1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/sh awk ' BEGIN { FS = "," } { ref = $1 val = $2 pkg = $3 posx = $4 posy = $5 rot = $6 side = $7 print ref FS posx FS posy FS side FS rot }' \ | sed \ -e '0,/Ref/{s/Ref/Designator/}' \ -e '0,/PosX/{s/PosX/Mid X/}' \ -e '0,/PosY/{s/PosY/Mid Y/}' \ -e '0,/Rot/{s/Rot/Rotation/}' \ -e '0,/Side/{s/Side/Layer/}'