COLOR 15
PRINT "LINER.EXE, revision 005."
PRINT "Liner. Written by Svalqyatchx 'Kaze'."
COLOR 10
PRINT "Example: liner carlos.txt carlos.lin"
COLOR 7

IF COMMAND$ = "" OR INSTR(COMMAND$, "/?") <> 0 OR INSTR(COMMAND$, " ") = 0 THEN END

TwoF$ = COMMAND$
lf$ = LEFT$(TwoF$, INSTR(TwoF$, " ") - 1)
rf$ = RIGHT$(TwoF$, LEN(TwoF$) - INSTR(TwoF$, " "))
PRINT "Input file: "; lf$
PRINT "Output file: "; rf$

        OPEN lf$ FOR INPUT AS #1
        YamaRaja& = 0
DO WHILE NOT EOF(1)
        YamaRaja& = YamaRaja& + 1
        LINE INPUT #1, l$
LOOP
        CLOSE #1
        YamaRaja% = LEN(LTRIM$(STR$(YamaRaja&)))

        OPEN lf$ FOR INPUT AS #1
        OPEN rf$ FOR OUTPUT AS #2
DO WHILE NOT EOF(1)
        LINE INPUT #1, l$: ul& = ul& + 1
        What$ = LTRIM$(STR$(ul&))
        What$ = STRING$(YamaRaja% - LEN(What$), "0") + What$
        PRINT #2, What$ + " " + l$
LOOP
        CLOSE #1, #2

PRINT "LINER: Done."
'LINER.bas

