. f_askfname.sh
. f_askstring.sh
ask_filename "Target File ( Blank is Cancel. ) : " 1
if [ $? -ne 0 ]; then
echo "*** Canceled."
return 1
fi
FILE=${_STR}
echo "Target File is \"${FILE}\""
ask_string "Save File[ ${FILE}.small ] : " 1
if [ $? -ne 0 ]; then
FILE2="${FILE}.small"
else
FILE2=${_STR}
fi
echo "Save File is \"${FILE2}\""
cat ${FILE} | tr '[A-Z]' '[a-z]' > ${FILE2}
echo "*** Successfull."
unset FILE1 FILE2 _STR
$ cat 1.txt
ABCDEFGHIJKLMNOPQRSTUVWXYZ
$ ./2small_char.sh
Target File ( Blank is Cancel. ) : 1.txt
Target File is "1.txt"
Save File[ 1.txt.small ] :
Save File is "1.txt.small"
*** Successfull.
$ cat 1.txt.small
abcdefghijklmnopqrstuvwxyz