文件名称:linux unix shell 学习笔记 很全 很经典
文件大小:3KB
文件格式:TXT
更新时间:2012-08-05 15:47:42
linux unix shell 学习 笔记
很全,很经典,一目了然 .. 举例2: $ nawk 'BEGIN{while("ls"|getline) print}' awk.sc2 datafile datafile2 employees employees2 lab5.data names passwd 解释:将把ls的输出送到getline。对于每次循环,getline都从 ls读取一个以上输出,然后打印到屏幕上 .. 举例3: $ nawk 'BEGIN{printf "What is your name?";\ >; getline name<"/dev/tty"}\ >; $1 ~ name {print "Found " name " on line ",NR "."}\ >; END{print "See ya, " name "."}' employees What is your name?Wangzhonghai See ya, Wangzhonghai.