摘要: 如果用标准的*NIX shell将不能使用bash的数组特性。虽然在Perl, Python, PHP及其他高级语言中数组已经不是一个强大的功能,但数组使用还是相当广泛。 BASH只支持一维数组,但参数个数没有限制。 声明一个数组: declare -a ar... 阅读全文
posted @ 2017-03-14 11:32 banlucainiao 阅读(55) 评论(0) 推荐(0)
摘要: 1. 获取某个文件夹下的所有文件名(含文件夹),并显示 #!/bin/sh #============ get the file name =========== Folder_A="/home/youname/shell/gotfilename/bin"... 阅读全文
posted @ 2017-03-14 09:26 banlucainiao 阅读(104) 评论(0) 推荐(0)
摘要: 在Unix和Linux的各种操作系统下,每个文件(文件夹也被看作是文件)都按读、写、运行设定权限。 例如我用ls -l命令列文件表时,得到如下输出: -rw-r--r-- 1 apple users 2254 2006-05-20 13:47 tt.htm ... 阅读全文
posted @ 2017-03-14 09:12 banlucainiao 阅读(758) 评论(0) 推荐(0)