|
楼主 |
发表于 2004-4-2 13:20:10
|
显示全部楼层
bash-2.04$ cat asmt01
#!/bin/bash
#****************************** Asmt 01 kevin yang ,zhuoping li
#
#
#
#
echo -e '########################################################\n'
echo '*** The current directory'
pwd
echo '-------------------------------------------------------'
echo -e '*** The number of visible file in the current directory:\c'
ls -l |grep '^-.*'|wc -l
echo 'Below is a list of these files:'
ls -l |grep '^-.*'|cut -c59-| pr -t -3-
echo '--------------------------------------------------------'
echo -e '*** The number of visible directories in the current directory:\c'
ls -l |grep '^d.*' |wc -l
echo 'Below is a list of these files:'
ls -l |grep '^d.*'|cut -c59-|pr -t -3-
echo '##############################################
运行在:
~your home directory
~ the directory /etc
~the directory /pub/cs/gboyd/cs160b/samples |
|