看板Programming
标 题Re: 如何避免awk自动换行?
发信站政大狂狷年少 (Thu Nov 16 01:31:43 2006)
转信站ptt!ctu-reader!ctu-peer!news.nctu!netnews.csie.nctu!news.cs.nthu!WHSHS
※ 引述《[email protected] (自由的感觉真好!)》之铭言:
> 请问该如何利用awk将下列文字档转换成多笔资料列?
> (awk总是会自动换行)
awk 有 sprintf 可以做格式化输出,
man awk 就会有说明了:
sprintf(fmt, expr, ... )
the string resulting from formatting expr ... according to the
printf(3) format fmt
--
Name: Tseng, Ling-hua E-mail Address:
[email protected]
School: National Tsing Hua University Department: Computer Science
Interesting: C++, Compiler, PL/PD, OS, VM, Large-scale software design
Researching: Undecided
Homepage:
https://it.muds.net/~uranus
--
╔═══╗ ┼────────────────────────╮
║狂狷 ║ │
* Origin:[ 狂 狷 年 少 ] whshs.cs.nccu.edu.tw ╰─╮
║ 年少║ ┼╮
< IP:140.119.164.252 > ╰─╮
╚╦═╦╝ ╰
* From:61-230-216-180.dynamic.hinet.net
─╨─╨─ KGBBS ─ ◎ 遨翔"BBS"的狂狷不驯;属於年少的轻狂色彩 ◎