I want to repeat the input text 5 times and want to save in another text file.However in every repetition first and last line number only be changed.
My input text is:
READ 1 ALL
DMN 2,3 ^DTND
DEL 2,3
WRITE 1A ALL
OUTPUT:
READ 1 ALL
DMN 2,3 ^DTND
DEL 2,3
WRITE 1A ALL
READ 2 ALL
DMN 2,3 ^DTND
DEL 2,3
WRITE 2A ALL
READ 3 ALL
DMN 2,3 ^DTND
DEL 2,3
WRITE 3A ALL
READ 4 ALL
DMN 2,3 ^DTND
DEL 2,3
WRITE 4A ALL
READ 5 ALL
DMN 2,3 ^DTND
DEL 2,3
WRITE 5A ALL
I tried
#!/bin/sh
for file in `cat input.txt`
do
yes $file
done