Skip to content

Instantly share code, notes, and snippets.

@phnessu4
Created May 22, 2013 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phnessu4/5625818 to your computer and use it in GitHub Desktop.
Save phnessu4/5625818 to your computer and use it in GitHub Desktop.
#计算脚本运行时间
time xxxx
#输出文件长度
ls -l | awk '{ print $5}'
#判断文件是否为空
ls -l | awk '{ if(!$5) print "empty" }'
#计算目录下所有.c文件行数
find -name *.c | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment