Introduction
Data Model
How Does Awk work?
Invoke
Program Structure
Records and Files
Built-In Variables
Print Statement
Begin and End
Examples of Begin
Specify Ranges by Pattern
Examples: Counting
Example: Sums and Averages
Example: Handling Text
Example: String Concatenation
Example: Print Last Input Line
Example: Built-in Functions
Example: Counting Lines, Words, and Characters
Flow Control Flow
Flow Control Flow - While
Flow Control Flow - For
String Concatenation
Arrays
Arrays
Some Useful Simple Scripts
Some Useful Simple Scripts
Conditional Operations
Pattern Expression
String Matching
Metacharacters
Escape Sequence
Basic regular expression
Combined regular expression
Regular Expression: Examples
Exp Regular Expression: Examples
Exp Regular Expression: Examples
Output
Output into Files
Output to Pipes
Getline Function
Variable
Expression
The System Function
Built-in String Functions
Scripts for NS2 Trace Data
Scripts for NS2 Trace Data - Avg. Packet Delay
Scripts for NS2 Trace Data - Avg. Throughput
Untitled Document
Basic data unit - word
Good for processing formatted input
Pattern match capability
C-like data manipulation capability
AWK是一種處理文字檔案的語言。它將檔案內容視為具有固定欄位的一系列記錄,
每一行都是一個記錄。AWK逐行讀取輸入檔案,並根據使用者的指令進行處理。
每行內容都會被分割成一系列的欄位存入預設變數($1, $2, $3, ...等)。
此外還有一些常用的預設變數,例如NR(讀到第幾行)及 NF(本行欄位數目)等,節省
不少程式設計的麻煩。 只要在輸入資料中有模式匹配,就執行一系列指令。
AWK直譯器對每個輸入行先判斷它是否符合使用者指定的模式(pattern),再根據結果觸發後續
的處理動作。而處理動作的語法非常類似C程式語言,對於已經熟悉C程式語言的使用者而言,
學習AWK程式語言是輕而易舉的事。讀者可從網路上找到海量的教材自行學習。
Thu Jan 11 14:33:42 CST 2024
Untitled Document
AWK 讀進一份資料時,會將檔案內容逐行的剖析成
一欄欄的資料,例如下面的一個含有四個欄位
(name, age, wagerate, hometown)的資料,及其
在AWK內的資料結構:
原始資料 AWK 內部資料結構
$1 $2 $3 $4
David
30
25.2
Chicago
Chris
20
20.4
Indy
Joe
55
40.2
Columbus
Jane
42
35.7
Holmdel
Bob
60
52.2
Naperville
而AWK 語法提供程式設計師以這種資料結構,進行程式設計。
Thu Jan 11 14:33:42 CST 2024
Untitled Document
scan set of input files in order
searching for lines which match the specified patterns,
Thu Jan 11 14:33:42 CST 2024
Untitled Document
awk -f awfscript input-file
Thu Jan 11 14:33:42 CST 2024
Untitled Document
if no pattern, do action for every line
if no action, print the input line
Thu Jan 11 14:33:42 CST 2024
Untitled Document
The input stream is divided into "records" terminated by a
record separator
$0 represents the entire line
Thu Jan 11 14:33:43 CST 2024
Untitled Document
FILENAME
file name
NR
number of records read
NF
number of fields in current line read
FS
field separator
RS
record separator
OFS
output field separator
ORS
output record separator
Thu Jan 11 14:33:43 CST 2024
Untitled Document
Script ID AWK Script 意義
awk-2-1
{ print }
copy input to output
awk-2-2
{ print NR, $2, $1 }
print line-number, 2nd, and 1st fields
awk-2-3
{ print $2 $1 }
print 2nd and 1st fields
awk-2-4
{ printf "%8.2f %10d\n", $2 , $1 }
print 2nd and 1st fields in designated format
awk-2-5
{ print > "outfile"}
print to "outfile"
awk-2-6
{ print | "mail bbs" }
pipe to mail
Thu Jan 11 14:33:43 CST 2024
Untitled Document
BEGIN { FS = ":" }
set the field separator as ":"
BEGIN { FS = "#|%" }
set the field separator as "#" or "%"
may not work on some systems
END { print NR }
count the number of lines in the input file
Thu Jan 11 14:33:43 CST 2024
Untitled Document
§ 功能
華氏溫度轉攝氏溫度
用法
f2c <temperature>
Script 3.5-X
Script 3.5-X
解釋
/dev/null 是一個有名無實的虛擬檔案 (dummy file),放在這個位置讓
awk 取用,否則 awk 會等著使用者從 STDIN 輸入資料,而不會自動停止。
§ 功能
攝氏溫度轉華氏溫度
用法
c2f <temperature>
Script 3.5-X
Script 3.5-X
Thu Jan 11 14:33:43 CST 2024
Untitled Document
Specify Ranges by Pattern
Thu Jan 11 14:33:44 CST 2024
Untitled Document
Thu Jan 11 14:33:44 CST 2024
Untitled Document
Example: Sums and Averages
Thu Jan 11 14:33:44 CST 2024
Untitled Document
Thu Jan 11 14:33:44 CST 2024
Untitled Document
Example: String Concatenation
David Chris Joe Jane Bob
Thu Jan 11 14:33:45 CST 2024
Untitled Document
Example: Print Last Input Line
NR retains its value in an END action, $0 does not.
Thu Jan 11 14:33:45 CST 2024
Untitled Document
Example: Built-in Functions
Script: awk-8 結果 (使用 awk-1 的輸入檔)
Thu Jan 11 14:33:45 CST 2024
Untitled Document
Example: Counting Lines, Words, and Characters
Thu Jan 11 14:33:45 CST 2024
Untitled Document
Thu Jan 11 14:33:45 CST 2024
Untitled Document
Flow Control Flow - While
Thu Jan 11 14:33:46 CST 2024
Untitled Document
Thu Jan 11 14:33:46 CST 2024
Untitled Document
字串的連接 (concatenation) 只需將各字串放在一起以空白隔開即可:
Thu Jan 11 14:33:46 CST 2024
Untitled Document
AWK 支援 Array
2. 支援 Associative Array (其索引是一個字串)
例: Conventional Array (索引是整數)
Thu Jan 11 14:33:46 CST 2024
Untitled Document
例: Associative Array (索引是字串)
Thu Jan 11 14:33:46 CST 2024
Untitled Document
Some Useful Simple Scripts
Script ID Script 說明
awk-15-1
END {print NR;}
印出總行數 (相當於 wc -l)
awk-15-2
NR == 10
印出第10行
awk-15-3
NF > 4
印出超過4個欄位的record
awk-15-4
NF > 0
印出至少有一個欄位的record
awk-15-5
{ print NF;}
印出每一個record 的欄位數
awk-15-6
{ print NF, $0;}
印出每一個record 的欄位數,及該行
awk-15-7
length ($0) > 80
印出長度大於80 的record
awk-15-8
{ print $2, $1; }
印出第二欄及第一欄
awk-15-9
{ $1 = NR; print; }
如果第一欄的值等於該行的行數,印出該行
awk-15-10
{ $2 = ""; print; }
如果第二欄是空字串,印出該行
Thu Jan 11 14:33:47 CST 2024
Untitled Document
Some Useful Simple Scripts
Script ID Script 說明
awk-15-11
{ tmp = $1; $1 = $2; $2 = tmp; print; }
印出每一個record 的欄位數,及該行
awk-15-12
{ nf += NF;}
END {print nf;}
印出每一個record 的欄位數,及該行
統計輸入資料中共有多少欄
(可用來計算一個檔案內共有多少英文字)
awk-15-13
/Beth/ { nlines ++; }
END { print nlines; }
印出每一個record 的欄位數,及該行
統計輸入資料中有多少行含有字串 'Beth'
awk-15-14
BEGIN {max=-999999;}
$1 > max {
max = $1;
maxline = $0;
}
END { print max, maxline; }
印出第一欄的最大值及行數
awk-15-15
{ for ( i = NF; i > 0; i--)
printf("%s ", $i);
printf ("\n");
}
將每一個record 內個各欄依照相反的順序印出來
15-16
{ sum = 0;
for ( i=1; i <= NF; i++) sum += $i;
print sum;
}
將每一個record 內個各欄相加,印出來,每一個record 一個小計
15-17
{ for ( i=1; i <= NF; i++) sum += $i;
END{ print sum; }
}
將每一個record 內個各欄相加,最後印出總計
15-18
{ for (i=1;i <= NF;i++)
if ($i<0) $i = -$i;
print;
}
將每一個record 內個各欄的負值轉正。
註:如果一個檔案內除了負值之外,沒有'-'號,
可以用 ex 直接刪掉負號即可,更為簡單。
Thu Jan 11 14:33:47 CST 2024
Untitled Document
/regular expression/ { statement }
compound pattern { statement }
pattern,pattern { statement }
Thu Jan 11 14:33:47 CST 2024
Untitled Document
<
>
<=
>=
==
!=
~ (Match)
!~ (Not Match)
Thu Jan 11 14:33:47 CST 2024
Untitled Document
格式 說明 例
/regexpr/
match to current line
/Asia/
expr ~ /regexpr/
match to expr
$4 ~ /Asia/
expr !~ /regexpr/
not match to expr
$2 !~ /Asia/
Thu Jan 11 14:33:47 CST 2024
Untitled Document
字串中的特殊符號 (Meta Characters)
\
^
$
[
]
|
(
)
.
*
+
?
Thu Jan 11 14:33:48 CST 2024
Untitled Document
字串中的特殊符號 (Escape Sequecnce)
符號 意義
\t
tab
\b
backspace
\f
formfeed
\n
newline
\r
carriage return
\ddd
八進位數字 (octal value) ddd
\c
其他特殊符號(消除特殊意義)
例: \\ for \, \* for *, \" for "
Thu Jan 11 14:33:48 CST 2024
Untitled Document
符號 意義
^
the beginning of a string
$
the end of a string
any single character
[ABC]
any of the characters, A, B, or C.
[A-Za-z]
any single letter
[^0-9]
any character but digit
Thu Jan 11 14:33:48 CST 2024
Untitled Document
Combined regular expression
功能 符號 意義
alternation
A|B
A or B
concatenation
AB
to string AB
closure
A*
zero or more A's
positive closure
A+
one or more A's
zero or one
A?
zero or one A's
parentheses
(r)
the same string as r does.
Thu Jan 11 14:33:48 CST 2024
Untitled Document
Regular Expression: Examples
例 意義
^C
以'C'開頭的字串
C$
以'C'結尾的字串
^C$
字串只含一個'C'
[AEIOU]
字串含有 AEIOU 中之任一字元
^.$
字串只含有一個字元
^...$
字串只含有三個字元
...
任意三個連在一起的字元
\.$
字串的結尾是一個'.'
^[ABC]
以A或B或C開頭之字串
^[^ABC]
不是以A或B或C開頭之字串
[^ABC]
A或B或C以外之字元
^[^a-z]$
字串只含有一個a-z以外之字元
(Asian|European)
Asian 或 European
(male|female)
male 或 female
(black|blue) bird
black bird 或 blue bird
Thu Jan 11 14:33:49 CST 2024
Untitled Document
Exp Regular Expression: Examples
例 意義
B*
空字串 或 B 或 BB, etc.
AB*C
AC 或 ABC 或 ABBC, etc.
AB+C
ABC 或 ABBC, etc.
ABB*C
ABC 或 ABBC, etc.
AB?C
AC 或 ABC
[A-Z]+
含有一個或更多的大寫英文字母字串
(AB)+C
ABC, ABABC, ABABABC, etc.
Thu Jan 11 14:33:49 CST 2024
Untitled Document
Exp Regular Expression: Examples
Example (matches any input line)
例 意義
/^[0-9]+$/
consists of only digits
/^[0-9][0-9][0-9]$/
exactly 3 digits
/^(\+|-)?[0-9]+\.?[0-9]*$/
decimal number with an optional sign and optional fraction
/^[+-]?[0-9]+[.]?[0-9]*$/
decimal number same as above
/^[A-Za-z][A-Za-z0-9]*$/
a letter followed by any letters or digits
/^[A-Za-z]$|^[A-Za-z0-9]$/
a letter or a letter followed by a digit
/^[A-Za-z][0-9]?$/
same as above
/^[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][+-]?[0-9]+)?$/
floating point decimal number
Thu Jan 11 14:33:49 CST 2024
Untitled Document
Output Separators (OFS, ORS)
Thu Jan 11 14:33:49 CST 2024
Untitled Document
Script ID Script 意義
awk-16-1
$3 > 1{ print $1, $3 > "bigpop"}
將第三欄之值大於1的record 之第一及第三欄印出於 bigpop 檔案中
awk-16-2
$3 <= 1{ print $1, $3 > "smallpop"}
將第三欄之值不大於1的record 之第一及第三欄印出於 smallpop 檔案中
awk-16-3
{print($1,$3) > ($3>1? "bigpop" : "smallpop" )}
awk-16-1 及 awk-16-2 之合併版本
awk-16-4
{ print > $1 }
將第一欄之值當作輸出之檔名,將整個record 印到該檔案
awk-16-5
{ print $1, $2 > $3 }
將第三欄之值當作輸出之檔名,將第一及第二欄印到該檔案
awk-16-6
{ print $1, ( $2 > $3 ) }
Thu Jan 11 14:33:49 CST 2024
Untitled Document
Thu Jan 11 14:33:50 CST 2024
Untitled Document
Fetch the next input record and performs the normal field-spliting operations on it.
return 1 if there was a record presented, 0 otherwise.
The expression 'getline x ' reads the next record into the
variable x and increments NR and FNR. No spliting is done; NF is
not set.
while ("who" | getline )
n++;
"date" | getline d;
while (getline < "file" > 0)
Thu Jan 11 14:33:50 CST 2024
Untitled Document
Awk variables take on numeric of string values according to context.
f1 f2 ... are considered ARGV[1], ARGV[2],....
f1, f2, .. are file names except when it is in the form of var=text,
var=text is considered variable initialization
Thu Jan 11 14:33:50 CST 2024
Untitled Document
Thu Jan 11 14:33:50 CST 2024
Untitled Document
Thu Jan 11 14:33:51 CST 2024
Untitled Document
Built-in String Functions
Script ID Script 意義
awk-X-1
{print length, $0;}
印出各行(record)的長度及內容
awk-X-2
{print length($0), $0; }
同上
awk-X-3
length < 10 || length > 20
字串長度小於 10 或 大於20
awk-X-4
substr(s,m,n)
從字串 s 的第m字元開始取n 個字元
awk-X-5
sprintf
輸出指令
awk-X-6
{index("banana", "an")}
return 2
awk-X-7
{$0 = "banana"; sub(/an/, "AN");}
replace banana by bANana
awk-X-8
{$0 = "banana"; sub(/(an)+/, "AN");}
replace banana by bANa
awk-X-9
{$0 = "banana"; gsub(/an/, "AN");}
replace banana by bANANa
Thu Jan 11 14:33:51 CST 2024
Untitled Document
Scripts for NS2 Trace Data
s -t 0.100000000 -Hs 0 -Hd -2 -Ni 0 -Nx 287.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 5.0 -It tcp -Il 40 -If 0 -Ii 0 -Iv 32 -Pn tcp -Ps 0 -Pa 0 -Pf 0 -Po 0
r -t 0.100000000 -Hs 0 -Hd -2 -Ni 0 -Nx 287.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.0 -Id 5.0 -It tcp -Il 40 -If 0 -Ii 0 -Iv 32 -Pn tcp -Ps 0 -Pa 0 -Pf 0 -Po 0
s -t 0.101748053 -Hs 0 -Hd -1 -Ni 0 -Nx 287.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id 5.255 -It DSR -Il 32 -If 0 -Ii 1 -Iv 32 -P dsr -Ph 1 -Pq 1 -Ps 1 -Pp 0 -Pn 1 -Pl 0 -Pe 0->0 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0
r -t 0.102720719 -Hs 1 -Hd -1 -Ni 1 -Nx 487.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md ffffffff -Ms 0 -Mt 800 -Is 0.255 -Id 5.255 -It DSR -Il 32 -If 0 -Ii 1 -Iv 32 -P dsr -Ph 1 -Pq 1 -Ps 1 -Pp 0 -Pn 1 -Pl 0 -Pe 0->0 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0
s -t 0.158389240 -Hs 0 -Hd -1 -Ni 0 -Nx 287.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 0.255 -Id 5.255 -It DSR -Il 32 -If 0 -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DSR -Il 76 -If 0 -Ii 4 -Iv 253 -P dsr -Ph 6 -Pq 0 -Ps 2 -Pp 1 -Pn 2 -Pl 6 -Pe 0->5 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0
f -t 0.193757480 -Hs 3 -Hd 2 -Ni 3 -Nx 887.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 13a -Md 3 -Ms 4 -Mt 800 -Is 5.255 -Id 0.255 -It DSR -Il 76 -If 0 -Ii 4 -Iv 252 -P dsr -Ph 6 -Pq 0 -Ps 2 -Pp 1 -Pn 2 -Pl 6 -Pe 0->5 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0
r -t 0.199261147 -Hs 2 -Hd 2 -Ni 2 -Nx 687.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 13a -Md 2 -Ms 3 -Mt 800 -Is 5.255 -Id 0.255 -It DSR -Il 76 -If 0 -Ii 4 -Iv 252 -P dsr -Ph 6 -Pq 0 -Ps 2 -Pp 1 -Pn 2 -Pl 6 -Pe 0->5 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0
f -t 0.199261147 -Hs 2 -Hd 1 -Ni 2 -Nx 687.00 -Ny 471.00 -Nz 0.00 -Ne -1.000000 -Nl RTR -Nw --- -Ma 13a -Md 2 -Ms 3 -Mt 800 -Is 5.255 -Id 0.255 -It DSR -Il 76 -If 0 -Ii 4 -Iv 251 -P dsr -Ph 6 -Pq 0 -Ps 2 -Pp 1 -Pn 2 -Pl 6 -Pe 0->5 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0
Thu Jan 11 14:33:51 CST 2024
Untitled Document
Scripts for NS2 Trace Data - Avg. Packet Delay
Thu Jan 11 14:33:51 CST 2024
Untitled Document
Scripts for NS2 Trace Data - Avg. Throughput
Thu Jan 11 14:33:52 CST 2024