V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
qq674949301
V2EX  ›  问与答

我如何处理这两个 EOF 命令集!

  •  
  •   qq674949301 · Jul 13, 2015 · 2250 views
    This topic created in 3953 days ago, the information mentioned may be changed or developed.
    脚本如下:
    #!/bin/sh
    # Copyright (C) 2015 OpenWrt.org

    _input=/jffs/chnroute.txt
    IPS=/usr/sbin/ipset

    insmod ip_set
    insmod ip_set_bitmap_ip
    insmod ip_set_bitmap_ipmac
    insmod ip_set_bitmap_port
    insmod ip_set_hash_ip
    insmod ip_set_hash_ipport
    insmod ip_set_hash_ipportip
    insmod ip_set_hash_ipportnet
    insmod ip_set_hash_net
    insmod ip_set_hash_netport
    insmod ip_set_list_set
    insmod xt_set

    IPLIST=$(cat <<-EOF | grep -E "^([0-9]{1,3}\.){3}[0-9]{1,3}"
    0.0.0.0/8
    10.0.0.0/8
    100.64.0.0/10
    127.0.0.0/8
    169.254.0.0/16
    172.16.0.0/12
    192.0.0.0/24
    192.0.2.0/24
    192.88.99.0/24
    192.168.0.0/16
    198.18.0.0/15
    198.51.100.0/24
    203.0.113.0/24
    224.0.0.0/4
    240.0.0.0/4
    EOF

    $IPS -N ss_spec_lan_ac hash:ip
    $IPS -! -R <<EOF
    create ss_spec_wan_ac hash:net
    $(egrep -v "^#|^$" $_input | sed -e "s/^/add ss_spec_wan_ac /")
    EOF
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2747 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 51ms · UTC 15:36 · PVG 23:36 · LAX 08:36 · JFK 11:36
    ♥ Do have faith in what you're doing.