- 论坛徽章:
- 0
|
- 1163 20:14:26 root@localhost:~/shelltest # awk -vOFS=asd 'BEGIN{print "","","",""}'
- asdasdasd
- 1164 20:14:35 root@localhost:~/shelltest #
复制代码 OFS实际是print的,,不过不能凭空生效:
- 1164 20:15:12 root@localhost:~/shelltest # awk -vOFS=asd 'BEGIN{print ,,,}'
- awk: BEGIN{print ,,,}
- awk: ^ syntax error
- awk: BEGIN{print ,,,}
- awk: ^ syntax error
- awk: BEGIN{print ,,,}
- awk: ^ syntax error
- awk: BEGIN{print ,,,}
- awk: ^ syntax error
- awk: cmd. line:1: BEGIN{print ,,,}
- awk: cmd. line:1: ^ unexpected newline or end of string
- 1165 20:15:17 root@localhost:~/shelltest #
复制代码 左右有$N或"X"就可以了。 |
|