Quote:
Originally Posted by fpmurphy
A more general solution using sed is
|
You are right of course. I wouldn't have limited it if the thread-starter wouldn't have explicitly stated that the character could only be "N" or "U".
Perhaps it is a matter of programming philosophy (which is not the topic of this thread - at least not directly), i would prefer my solution over the general one followed by a line catching all the lines not matched by my solution to point them out as suspicious - lines which "shouldn't exist" at all.
The point is: if a specification says that the specific character can only be "N" or "U", then i would like to be informed if a line with neither "N" or "U" on it comes up. Maybe the specification has changed, maybe my script is faulty, maybe some pre-processing steps producing the lines are faulty - whatever. At least there is *something* that might have to be dealt with.
With all due respect
bakunin