Date: Mon, 20 Mar 1995 15:10:23 -0800 From: Julian Elischer <julian> To: hackers Subject: patch from newsgroup applicable.. Message-ID: <199503202310.PAA13154@freefall.cdrom.com>
next in thread | raw e-mail | index | archive | help
*** cut.c.orig Mon Mar 20 14:33:26 1995 --- cut.c Mon Mar 20 14:34:03 1995 *************** *** 218,224 **** int output; char lbuf[_POSIX2_LINE_MAX + 1]; ! for (sep = dchar, output = 0; fgets(lbuf, sizeof(lbuf), fp);) { for (isdelim = 0, p = lbuf;; ++p) { if (!(ch = *p)) err("%s: line too long.\n", fname); --- 218,225 ---- int output; char lbuf[_POSIX2_LINE_MAX + 1]; ! for (sep = dchar; fgets(lbuf, sizeof(lbuf), fp);) { ! output = 0; for (isdelim = 0, p = lbuf;; ++p) { if (!(ch = *p)) err("%s: line too long.\n", fname); test case: erf# cut -f2 -d: <<DONE 1:one:x 2:two:xx 3:three:xxx 4:four:xxxx DONE one :two :three :four which is wrong....... julian E
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503202310.PAA13154>