[Info-vax] Removing blank lines from text files
Bill Gunshannon
bill.gunshannon at gmail.com
Sat Jun 15 17:46:32 EDT 2019
On 6/15/19 10:31 AM, Dave Froble wrote:
> On 6/14/2019 11:47 PM, Bob wrote:
>> Alas, that also finds lines with whitespace but no text.
>> My files include many of those.
>>
>
> The following simple (untested) program is most likely less typing than
> has already been spent on this subject.
>
> 10 Input "Input filename", F$
> Open F$ for Input as File 1%
>
> 20 Input "Output filename"; F2$
> Open F2$ for Output as File 2%
>
> On Error GoTo 90
>
> 30 Linput #1%, L$
> GoTo 30 If L$=""
> Print #2%, L$
> GoTo 30
>
> 90 Resume 99 If Erl=30 and Err=11
> On Error GoTo 0
>
> 99 End
>
This and other examples will all fail based on the fact that
the original problem includes lines that although appearing
blank may in fact contain space characters.
I can think of no simple solution but the problem can be
handled by any of a number of programming languages if
one is willing to invest the time.
bill
More information about the Info-vax
mailing list