#!/bin/sh # Put double quotes around every line of input. # # This is useful when you're using 'find' to generate a list of files # to form the input to some other command, but some of the files have # spaces or other unfriendly characters in their names. E.g., # 'find . -type f | xargs md5sum' or similar incantations. while true; do read LINE if [ "${LINE}X" = "X" ]; then exit 0 fi echo -n '"' echo -n "${LINE}" echo '"' done