Computing.Net > Forums > Solaris > Ipfilter through Sed scripting

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Ipfilter through Sed scripting

Reply to Message Icon

Name: aliabbas
Date: November 10, 2004 at 08:22:08 Pacific
OS: Windows XP
CPU/Ram: 1.4 GHz P4/512 DDR
Comment:

Ipfilters block IPs through a ipf.conf, I want to delete enteries from ipf.conf through script.I tried shell scripting and then sed scripting

sed '/\<ip_add\>/d' /etc/opt/ipf/ipf.conf

although the command shows the output without the ip_add that is specified however it does not edit the file.
Is there any possible way to do this through scripting so that I dont have to open file again and again


Ali Abbas



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: November 11, 2004 at 05:13:25 Pacific
Reply:

sed -e 's/pattern/replacement' oldfile > newfile

sed -e 's/string1/replacement1/' -e 's/string2/replacement2/' -e 's/string3/replacement3/' oldfile > newfile && mv newfile oldfile


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Ipfilter through Sed scripting

Why can't rewrite PATH through a script? www.computing.net/answers/solaris/why-cant-rewrite-path-through-a-script/2106.html

sed disk space (non) error www.computing.net/answers/solaris/sed-disk-space-non-error/5002.html

jumpstart client booting but... www.computing.net/answers/solaris/jumpstart-client-booting-but/2896.html