#!/usr/bin/sh sed -e 's/[^0-9]//g' input | tr -d '\n' > out.numeric sed -e 's/[^a-zA-Z]//g' input | tr -d '\n' > out.alphabetic