zoukankan      html  css  js  c++  java
  • 文件换行输入和清空

    cat > /etc/security/limits.conf<< EOF
    * soft nproc 16384
    * hard nproc 16384
    * soft nofile 1048576
    * hard nofile 1048576
    * soft stack 10240
    * hard stack 32768
    * hard memlock 8000000
    * soft memlock 8000000
    EOF

    echo -ne "
    * soft nofile 65536
    * hard nofile 65536
    " >>/etc/security/limits.conf

    cat /dev/null > /etc/security/limits.conf

    cat >> a.txt << EOF
             <ads_cluster1>
                 <shard>
                  <internal_replication>true</internal_replication>
                         <replica>
                         <default_database>shard1_ads</default_database>
                         <host>10.0.12.14</host>
                         <port>19000</port>
                         <user>default</user>
                         <password>eb22d98eaf028b1ca5c36548193d604a</password>
                         </replica>
                         <replica>
                         <default_database>shard1_ads</default_database>
                         <host>10.0.12.15</host>
                         <port>19000</port>
                         <user>default</user>
                         <password>eb22d98eaf028b1ca5c36548193d604a</password>
                         </replica>
                         <replica>
                         <default_database>shard1_ads</default_database>
                         <host>10.0.12.17</host>
                         <port>19000</port>
                         <user>default</user>
                         <password>eb22d98eaf028b1ca5c36548193d604a</password>
                         </replica>
                 </shard>
             </ads_cluster1>
    EOF



    sed -i '$d' config.xml
    cat >> config.xml << EOF
        <distributed_ddl>
            <path>/clickhouse/task_queue/ddl</path>
        </distributed_ddl>
    </yandex>
    EOF

    echo -e '    <distributed_ddl>         <path>/clickhouse/task_queue/ddl</path>     </distributed_ddl> </yandex>' >> config.xml


    sed -i '55 r a.txt' metrika.xml
    cat -n metrika.xml
    sed -i '108,111d' metrika.xml
    rm -f a.txt


  • 相关阅读:
    es6之更优雅的条件语句
    html 提取 公用部分
    jQuery 新添加元素事件绑定无效
    关于ie6块元素行内元素转换
    git 入门级使用
    vim入门级使用
    git安装配置
    学习使用mac
    Angular常用标记
    npm/bower/brew
  • 原文地址:https://www.cnblogs.com/tonggc1668/p/14952644.html
Copyright © 2011-2022 走看看