reopen.awk

来自「awk scripts awk scripts awk scripts awk 」· AWK 代码 · 共 17 行

AWK
17
字号
# Date:  04-12-89  11:24
# From:  Jeff Clough
# To:    Rob Duff
# Subj:  Bug (I think) in AWK 2.12

#      The AWK documentation implied that I could write to a file and then use 
# that same file for input provided that I closed the file first. When I tried 
# to do this, I found that the file was erase as it was opened the second time 
# (for input). 

BEGIN {
    print "This is not a test, this is ROCK AND ROLL." > "reopen.dat"
    close ("reopen.dat");
    getline < "reopen.dat"
    print
}

⌨️ 快捷键说明

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