Wednesday, August 10, 2011

UNIX script: add new line at the end of file, if not exist

if [[ -n "`/bin/tail -1c $unixfile`" ]]; then
echo >> $unixfile
fi

No comments:

Post a Comment