#!/sbin/ksh if [[ -z $1 ]] ; then echo Usage: prepend 'string' exit 0; fi set -A fileList `ls -1 .` for file in ${fileList[*]}; do echo prepending $1 to $file error=`mv $file $1$file` wait echo $error done