使用 Linuxfind
命令-iname
选项,我想查找和移动具有许多不同扩展名 ( .pdf, .doc, .xlx, .ppt
) 的文件。我知道我可以将多种模式与grep
. 但这也可以做到find
吗?
Linux Mint 上的 Bash 4.3 shell:
我意识到 Bash shell 是无类型的,或者具有非常弱的打字形式。但是,是否可以调用 Bash shell(例如使用某些选项),以便当声明的整数变量被滥用(例如,通过尝试将字符串存储到该整数变量中)时,shell 将抛出运行时错误?
示例代码:
declare -i age
age=23
echo "$age" # result is 23
age="hello"
echo "$age" # result is not the string hello - wish I could get an error message here!```
Run Code Online (Sandbox Code Playgroud)