change "echo ===" to "echo #<<<" to avoid confusing when searching for ===

This commit is contained in:
Luk
2024-12-13 20:09:17 +08:00
parent 4f1b5809e0
commit c063e02f1e
58 changed files with 328 additions and 265 deletions

View File

@@ -3,39 +3,39 @@ echo "find \$FOLDER -mindepth \$MINDEPTH -maxdepth \$MAXDEPTH -type d_f_l -name
echo "***************************************"
echo "To find in which path? Enter [root path] or [leave blank] for the current path [[`pwd`]]:"
read -p ">>> " FIND_FOLDER
read -p "path #>>> " FIND_FOLDER
if [ ! "$FIND_FOLDER" ]
then
FIND_FOLDER=`pwd`
fi
read -p "mindepth >>> " MINDEPTH
read -p "mindepth #>>> " MINDEPTH
if [ "$MINDEPTH" ]
then
MINDEPTH_CLAUSE="-mindepth $MINDEPTH"
fi
read -p "maxdepth >>> " MAXDEPTH
read -p "maxdepth #>>> " MAXDEPTH
if [ "$MAXDEPTH" ]
then
MAXDEPTH_CLAUSE="-maxdepth $MAXDEPTH"
fi
echo "To find file or directory? [f] for file, [d] for directory, [l] for link, [anything else] for all:"
read -p ">>> " FIND_TYPE
read -p "type #>>> " FIND_TYPE
if [ "$FIND_TYPE" = 'f' ] || [ "$FIND_TYPE" = 'd' ] || [ "$FIND_TYPE" = 'l' ]
then
FIND_TYPE_CLAUSE="-type $FIND_TYPE"
fi
echo "To match pattern: [regex pattern] (e.g. '._*', '.*.js') or or [leave blank] for all:"
read -p ">>> " FIND_PATTERN
read -p "#>>> " FIND_PATTERN
if [ ! "$FIND_PATTERN" ]
then
FIND_PATTERN="*"
fi
echo "To do something on each: [command line] or [leave blank] for 'echo':"
read -p ">>> " FIND_ACTION
read -p "pattern #>>> " FIND_ACTION
if [ ! "$FIND_ACTION" ]
then
FIND_ACTION='echo'