随笔分类 - shell
摘要:#!/bin/bash #java environment variables Base_Path=$(cd `dirname $0`; pwd) echo $Base_Path JAVA_HOME=$Base_Path/jdk1.8.0_131 echo $JAVA_HOME JAVA_BIN=$Base_Path/jdk1.8.0_131/bin echo $JAVA_BIN PATH=$PA
        阅读全文
            
摘要:参考: 网站 stackoverflow 以及segmentfault。
        阅读全文
            
摘要:#!/bin/sh a=`uname -a` b="Darwin" c="centos" d="ubuntu" if [[ $a =~ $b ]];then echo "mac" elif [[ $a =~ $c ]];then echo "centos" elif [[ $a =~ $d ]];then echo "ubuntu" else echo $a fi
        阅读全文
            
摘要:awk 方式 利用${#str}来获取字符串的长度 wc 方式(注意是包含换行符的) 参考: https://www.jb51.net/article/121290.htm
        阅读全文
            
摘要:test.sh 输出 参考: https://www.jb51.net/article/121290.htm
        阅读全文
            
摘要:输出 还可以写成 或者 参考: https://blog.csdn.net/u010003835/article/details/80750003
        阅读全文
            
摘要:default.yaml test.sh 输出 参考: https://www.cnblogs.com/chengmo/archive/2010/10/02/1841355.html
        阅读全文
            
摘要:参考: https://www.cnblogs.com/faithfu/p/9472817.html
        阅读全文
            
摘要:输出 参考: https://www.runoob.com/linux/linux-shell-variable.html
        阅读全文
            
摘要:test.sh: 输出 参考: https://www.runoob.com/linux/linux-shell-variable.html
        阅读全文
            
摘要:test.sh 输出 参考: https://runoob.com/linux/linux-shell-variable.html
        阅读全文
            
摘要:参考: https://blog.csdn.net/bcfdsagbfcisbg/article/details/78603781
        阅读全文
            
摘要:使用CURL时,有两个超时时间:一个是连接超时时间,另一个是数据传输的最大允许时间。连接超时时间用--connect-timeout参数来指定,数据传输的最大允许时间用-m参数来指定。 连接超时的话,出错提示形如:curl: (28) connect() timed out!数据传输的最大允许时间超
        阅读全文
            
摘要:[admin@localhost file]$ cat file hello 0 hello 1 hello 2 hello 3 hello 4 [admin@localhost file]$ cat test.sh #!/bin/bash while read line do echo 'buy '$line done < file >> file_b [admin@localhost file
        阅读全文
            
摘要:使用.或者source api.sh test.sh 输出
        阅读全文
            
摘要:test.sh 输出
        阅读全文
            
摘要:test.sh: echo -e "hello w\norld!"echo -e "hello w\c"echo "orld!" 输出 bogon:Desktop macname$ ./test.shhello world!hello world!
        阅读全文
            
 
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号