perl -pe 'print "_" if $a++;' -i.bak yourfile.txt