Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell脚本搜索常规文件_Shell_Unix_Scripting - Fatal编程技术网

Shell脚本搜索常规文件

Shell脚本搜索常规文件,shell,unix,scripting,Shell,Unix,Scripting,我需要一个shell脚本来查找作为参数给定的目录中的常规文件,并对它们进行计数,以便显示它们的编号。find/some/path-name“aaa.*”|wc-lfind/some/path-name“aaa.*”| wc-lfind/some/path-name“aaa.*”| wc-lfind/some/path-name“aaa.*”| wc-l #! /bin/ksh cd $1 list=`ls -l | grep -v '^d' | wc -l` echo $list

我需要一个shell脚本来查找作为参数给定的目录中的常规文件,并对它们进行计数,以便显示它们的编号。

find/some/path-name“aaa.*”|wc-l

find/some/path-name“aaa.*”| wc-l

find/some/path-name“aaa.*”| wc-l

find/some/path-name“aaa.*”
| wc-l

#! /bin/ksh

cd $1
list=`ls -l | grep -v '^d' | wc -l`
echo $list