![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| query on how to search for a line and read 4th word from that line | jaggesh | UNIX for Dummies Questions & Answers | 4 | 07-01-2008 11:21 PM |
| search by modified date | kotasateesh | Shell Programming and Scripting | 4 | 06-24-2008 10:59 AM |
| Script needs to be modified - Each 5 Rows to be joined in single line with comma (,) | ntgobinath | Shell Programming and Scripting | 0 | 05-07-2008 09:37 AM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| how to retrieve original contents of a modified file (modified using vi) | novice100 | UNIX for Dummies Questions & Answers | 3 | 05-31-2007 09:50 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
search and add same line modified in iptables
I have in iptables file the following:
-A RUN -p tcp -m tcp -s ipaddress1 --dport xxx --syn -j ACCEPT -A RUN -p tcp -m tcp -s ipaddress2 --dport xxx --syn -j ACCEPT And I want to add for each ipaddress1 and ipaddress2 another IP address Like this: -A RUN -p tcp -m tcp -s ipaddress1 --dport xxx --syn -j ACCEPT -A RUN -p tcp -m tcp -s ipaddress2 --dport xxx --syn -j ACCEPT -A RUN -p tcp -m tcp -s ipaddress3 --dport xxx --syn -j ACCEPT Because I have multiple services and definitions I have to search for ipaddress1 and ipaddress2 to add the third IP. I try to do with sed but no success. Thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|