From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Cast To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: <201201261315.09613.dexen.devries@gmail.com> References: <201201261315.09613.dexen.devries@gmail.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 26 Jan 2012 09:32:25 -0600 Message-ID: <1327591945.25593.1.camel@dell-desktop.example.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] trailing newline in awk Topicbox-Message-UUID: 61c829cc-ead7-11e9-9d60-3106f5b1d025 On Thu, 2012-01-26 at 13:15 +0100, dexen deVries wrote: > hi list, > > can't wrap my head around this: in an awk script, how to take some action if a > file lacks last trailing Line Feed? > > i want to modify files with contents like: > text LF > text LF > text > > and leave undisturbed files with content like: > text LF > text LF > text LF If this is all you're trying to do, awk 1 file works, no? jcc