ex-17-07_awk.sh

来自「Berkely的学生写的」· Shell 代码 · 共 21 行

SH
21
字号
#!/bin/sh# Chapter 17 - Using awk# This script demonstartes using numeric expressions in awk## You may have to change /bin/echo to /bin/echo -n in order# for the output to look the same as in the book.for i in $@ ;do    if [ -f "$i" ] ; then        /bin/echo "$i\c"        awk '            /^ *$/ { x+=1 ; }            END { printf " %s\n",x; }        ' "$i"    else        echo "ERROR: $i not a file." >&2    fidone

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?