Linux shell环境中存储了两种基本类型的数据:环境变量和shell变量。当然,除了变量,shell也存储了一些可编程的数据,即别名和shell 函数。我们可以用bash命令set,或者使用printenv命令程序来查看环境变量。鉴于环境变量列表比较长,我们可以将每个命令的输出通过管道符传递给less 来输出列表,例如:[...【阅读全文】
方法一:使用循环[root@localhost ~]# vim rename_file.sh#!/bin/bashecho "Enter the target directory "read target_dircd $target_dir echo "Enter the file extension to search without a dot"read old_ext echo "Enter the new file extension to rename to without a dot"read new_ext echo "$targe...【阅读全文】