我已经编写了附加的bstls.shshell 脚本,它使用命令 select 来选择作为参数传递的文件夹中的子文件夹或文件,执行 ls 命令。
#! /bin/bash
#Personal version of shell command ls which presents to user the list of files with shell command select
#Usage: bstls.sh folder
#if parameter numbers is different from one, exit
if [ $# -ne 1 ]
then
echo -e "Usage:\n\tbstls folder"
exit 1
fi
PS3='Which element to ls?'
#command sed substitutes blank spaces with £ in file or folder names
#in this way user can select files or folders with blank …Run Code Online (Sandbox Code Playgroud)