Link to home
Create AccountLog in
Avatar of TheonW
TheonWFlag for United States of America

asked on

Script to create import file

I need a script that will read a text file, and for every line in the text file create a few lines of data in a second text file.

input text file looks like this
navs.org.ukhome
negotiationisdone.com
negotiationisdone.wordpress.com
negotiationisover.blogspot.com
negotiationisover.com

I need the out put file to look like this

               edit "navs.org.ukhome"
                    set action block
                    set type wildcard
                next
                edit "negotiationisdone.com"
                    set action block
                    set type wildcard
                next
            edit "negotiationisdone.wordpress.com"
                    set action block
                    set type wildcard
                next
            edit "negotiationisover.blogspot.com"
                    set action block
                    set type wildcard
                next
            edit "negotiationisover.com"
                    set action block
                    set type wildcard
                next
ASKER CERTIFIED SOLUTION
Avatar of ZabagaR
ZabagaR
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of TheonW

ASKER

I made a few changes for spacing and notice that you put the create file first, no big deal,  easy fix, thanks