Thread View: comp.bugs.sys5
1 messages
1 total messages
Started by Wayne Krone
Wed, 18 Jan 1989 01:41
nl(1) defect or feature?
Author: Wayne Krone
Date: Wed, 18 Jan 1989 01:41
Date: Wed, 18 Jan 1989 01:41
18 lines
1017 bytes
1017 bytes
The command nl(1) numbers the lines of the input text. You can limit the lines numbered to those matching the regular expression "pattern" by using the option "-bppattern" (among others). While doing some other work on nl(1), I noticed when it processes a text line it passes the text plus the trailing newline to the regular expression routine. This means the line: abc must be matched by the RE "abc\n$" instead of "abc$". Other commands strip off the newline before performing the regular expression match. It's quite easy to make nl(1) work similar to the other commands, but I was unsure whether I should fix this as a defect or document it as a feature. Any opinions? Thanks, Wayne Krone
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads