added text to every line of a file
Mike Ballon
calzonie at hawaii.rr.com
Fri Jan 26 16:30:48 PST 2001
I owe you one, thanks
>On Fri, 26 Jan 2001, Mike Ballon wrote:
>
>> I have an 'ip block list' that gets sent to me every month containing anywhere
>> from 250-500 lines. To add this to my router's access-list I have to insert
>> "access-list 100 deny ip host" at the beginning of every line. I believe
this
>> can be done with sed and awk but I haven't been able to do it, help a brother
>> out.
>>
>> Would also be nice to add "any log" at the end of every line as well.
>
>cat file | awk '{ print "access-list 100 deny ip host", $0, "any log" }'
>
>Been doing some awk work. nice stuff.
>
>
>
>
>---
>You are currently subscribed to luau as: calzonie at hawaii.rr.com
>To unsubscribe send a blank email to $subst('Email.Unsub')
>
More information about the LUAU
mailing list