awk ORS-输出记录分隔符

示例

由awk用于分隔记录,并在每个print语句的末尾输出。例如:

echo "a b c
d e f" | awk 'BEGIN {ORS="|"} {print $2, $3}'

产生:

b c|e f

默认值为\n(换行符)。