lemgandilemgandi@mastodon.social
Aug 24, 2026, 5:04 PMspaces_to_underlines.sh. A bunch of error handling code, but the nub is simple:
NEWFILENAME=$( echo "${INFILE}" | tr ' ' '_' )
if [ -f ${NEWFILENAME} ]
then
echo ${NEWFILENAME} exists. Fix this first.
usage $0
exit 1
fi
set -x
mv "${INFILE}" ${NEWFILENAME}