[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] [OT] Regular Expression Help
- Subject: [ale] [OT] Regular Expression Help
- From: ecashin at noserose.net (Ed Cashin)
- Date: Tue, 25 Aug 2009 11:21:28 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
What's the software you're using? To get the output I think you want
you don't need a regular expression in awk, since the number of fields
is four when there's a letter and three when it's missing.
awk '{if (NF!=4) print "= N"; else print "= " $3}' < /tmp/data | nl
| sed 's! *!line !'
--
Ed Cashin <ecashin at noserose.net>