Using the mysql Client to Export Data
% mysql -e "SELECT account, shell FROM passwd" -N myDatabase > shells.txt