From mboxrd@z Thu Jan 1 00:00:00 1970 From: 9p-st@imu.li (Tristan Plumb) Date: Mon, 4 Apr 2011 03:54:44 -0400 Subject: [9fans] Making read(1) an rc(1) builtin? In-Reply-To: <5ddd9deccbea5e8556dfc0c228b63311@ladd.quanstro.net> References: <86fwpz55nj.fsf@cmarib.ramside><257867.782e4d7b.wsc0.mx@tumtum.plumbweb.net> <5ddd9deccbea5e8556dfc0c228b63311@ladd.quanstro.net> Message-ID: <257867.d17c021e.pp6m.mx@tumtum.plumbweb.net> Topicbox-Message-UUID: c7f4e7d6-ead6-11e9-9d60-3106f5b1d025 (right, sorry erik for the double) > i hate to be pedantic, By all means, please be pedantic, I was flat wrong. >ifs is not a list; it is a set of characters like strpbrk(2). And it matches [$ifs]+ which is the other piece I always forget. > for(line in `{ifs=$nl cat}){...} That is exactly what I was saying, thank you. That's what I get for spending the last few days writing in php, sigh. > as per plan 9 tradition, the first non-option terminates > option processing. lindon's echon is not required. giving > echo -n as its first argument works fine. What I thought smiley was referring to is when the first argument is inteded to output -n, but doesn't. What I gave obviously puts an extra space in (I guess I was a bit fuzzy earlier), echo -n $it^$nl works if $it is not a list. I've never seen this be a problem in practice myself. -- All original matter is hereby placed immediately under the public domain.