a2p bug

Jul 02, 2014 09:32

"a2p" program translates awk programs to perl programs. Tried it, immediately bumped into a different interpretation of "$0":

echo A B C D E | awk '{ $3="x"; print $0; }'
A B x D E

echo A B C D E | perl -e "$(echo '{ $3="x"; print $0; }' | a2p)"
A B C D E

upd: patches and more bugs

shell

Previous post Next post
Up