Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generated by iptables 04:13:50 2015
- *filter
- :INPUT ACCEPT [0:0]
- :FORWARD ACCEPT [0:0]
- :OUTPUT ACCEPT [0:0]
- -A INPUT -p tcp -m tcp --sport http --dport 1024: -m state --state ESTABLISHED -j ACCEPT
- -A INPUT -p tcp -m tcp --sport https --dport 1024: -m state --state ESTABLISHED -j ACCEPT
- -A INPUT -p tcp -m tcp --sport webcache --dport 1024: -m state --state ESTABLISHED -j ACCEPT
- COMIT
- # Completed on Mon Dec 04:13:50 2015
- INPUT
- FORWARD
- OUTPUT
- 13:50
- INPUT
- 0]
- FORWARD
- 0]
- OUTPUT
- 0]
- 13:50
- grep -Po ':K[^ ]*' file
- sed -ne's/^:([[:upper:]]*).* $/1/p' <in >out
- sed -ne's/^ *:([[:upper:]]*).*/1/p'
- grep -Po '^ *:K[^ ]*' file
- INPUT
- FORWARD
- OUTPUT
- sed -n ' # -n do not print lines to output by default
- /^:.* $/ { # address lines beginning with colon, ending with space
- s/^:// # remove colon at beginning of line
- s/ .*// # remove first space and everything following
- p # print the edited line
- }
- '
Add Comment
Please, Sign In to add comment