in reply to working with files
sed -n /^@/s///p input.txt grep ^@ input.txt | cut -c 2- awk '/^@/{sub ("@",""); print}' input.txt perl -ane 'length shift' -e@F -F@ -e' or print @F' input.txt [download]