霍格沃兹测试学院测试开发课程第二节课 Bash 教程

服务器上的命令列表.


   98  content=$(curl 'https://www.baidu.com/s?ie=utf-8&newi=1&mod=1&isbd=1&isid=c320342000026d8c&wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&oq=appium&rsv_t=118ekzbRi4edfq5DfZPbD1QmAD5WL6ViRtBxsL88xXwSszp1%2FbVzqZNwxsxhcUk%2FWQyf&rsv_sug3=9&rsv_sug1=9&rsv_sug7=100&rsv_pq=c320342000026d8c&rsv_sug4=37523&bs=appium&rsv_sid=24360_1427_24566_21109_18560_17001_20718&_ss=1&clist=34ac01c38af0fa11&hsug=&f4s=1&csor=6&_cr1=36846' -H 'Pragma: no-cache' -H 'is_xhr: 1' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' -H 'is_pbs: appium' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' -H 'Referer: https://www.baidu.com/s?wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&oq=appium&rsv_t=118ekzbRi4edfq5DfZPbD1QmAD5WL6ViRtBxsL88xXwSszp1%2FbVzqZNwxsxhcUk%2FWQyf&rsv_sug3=9&rsv_sug1=9&rsv_sug7=100&rsv_pq=c320342000026d8c&rsv_sug4=37523' -H 'is_referer: https://www.baidu.com/s?wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_sug3=7&rsv_sug1=7&rsv_sug7=100' --compressed | grep 百度为您找到相关结果约)
   99  echo $content
  100  echo ${content#*结果}
  101  echo ${content#*结果约}
  102  content1=${content#*结果约}
  103  echo ${content%个}
  104  echo ${content1%个}
  105  echo ${content1%个*}
  106  content2=${content1%个*}
  107  content3=${content2//,/}
  108  echo $content3
  109  history
  110  history | last -10
  111  history |tail -10
  112  history |tail -20
  113  history
  114  history
  115  history  --help
  116  history 10
  117  history 30 > baidu.sh
  118  vi baidu.sh
  119  ls
  120  vi baidu.sh
  121  history
  122  vi baidu.sh
  123  bash -x  baidu.sh  appium
  124  vi baidu.sh
  125  echo "x\\n333"
  126  echo -e "x\\n333"
  127  x=100
  128  echo -e "x\\n33$x"
  129  echo -e 'x\\n33$x'
  130  vi baidu.sh
  131  echo "xxxx$x"
  132  echo 'dddd$xxxxx'"xxxx$x"
  133  vi baidu.sh
  134  bash -x  baidu.sh  appium
  135  bash -x  baidu.sh  robotium
  136  bash -x  baidu.sh 接口测试
  137  bash -x  baidu.sh uiautomator
  138  bash baidu.sh uiautomator
  139  vi baidu.sh
  140  bash baidu.sh uiautomator
  141  curl 'https://mp.weixin.qq.com/cgi-bin/bizlogin?action=startlogin' --data 'username=xxx@qq.com&pwd=223432432423434324'
  142  curl 'https://mp.weixin.qq.com/cgi-bin/bizlogin?action=startlogin' --data 'username=xxx@qq.com&pwd=223432432423434324'  -H 'Referer: https://mp.weixin.qq.com/'
  143  netstat
  144  netstat  -tlnp
  145  netstat  -t
  146  netstat  -t  | grep ssh
  147  netstat  -t  | grep ssh | wc -l
  148  find /home/*/demo.sh  -maxdepth 1
  149  find /home/*  -maxdepth 1
  150  ls
  151  ls |grep
  152  echo $?
  156  echo 1 2 3
  157  echo 1 2 3  | awk '{print }'
  158  echo 1 2 3  | awk '{print $0 }'
  159  echo 1 2 3  | awk '{print $1 }'
  160  echo 1 2 3  | awk '{print $2 }'
  161  echo 1 2 3  | awk '{print $3 }'
  162  echo '1|2|3'  | awk '{print $3 }'
  163  echo '1|2|3'  | awk '{print $0 }'
  164  echo '1|2|3'  | awk '{print $1 }'
  165  echo '1|2|3'  | awk '{print $2 }'
  166  echo '1|2|3'  | awk -F '|'  '{print $2 }'
  167  echo '1|2+3'  | awk -F '|'  '{print $2 }'
  168  echo '1|2+3'  | awk -F '||+'  '{print $2 }'
  169  echo '1|2+3_4#5'  | awk -F '||+|_|#'  '{print $2 }'
  170  echo '1|2+3'  | awk -F '||+'  '{print $2 }'
  171  echo '1|2+3'  | awk -F '\\||+'  '{print $2 }'
  172  echo '1|2+3'  | awk -F '\\\\||+'  '{print $2 }'
  173  echo '1|2+3_4#5'  | awk -F '\\\\||+|_|#'  '{print $2 }'
  174  echo '1|2+3_4#5'  | awk -F '\\\\||+|_|#'  '{print $3 }'
  175  echo '1|2+3_4#5'  | awk -F '\\\\||+|_|#'  '{print $4 }'
  178  curl 'https://www.baidu.com/s?ie=utf-8&newi=1&mod=1&isbd=1&isid=c320342000026d8c&wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&oq=appium&rsv_t=118ekzbRi4edfq5DfZPbD1QmAD5WL6ViRtBxsL88xXwSszp1%2FbVzqZNwxsxhcUk%2FWQyf&rsv_sug3=9&rsv_sug1=9&rsv_sug7=100&rsv_pq=c320342000026d8c&rsv_sug4=37523&bs=appium&rsv_sid=24360_1427_24566_21109_18560_17001_20718&_ss=1&clist=34ac01c38af0fa11&hsug=&f4s=1&csor=6&_cr1=36846' -H 'Pragma: no-cache' -H 'is_xhr: 1' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' -H 'is_pbs: appium' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' -H 'Referer: https://www.baidu.com/s?wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&oq=appium&rsv_t=118ekzbRi4edfq5DfZPbD1QmAD5WL6ViRtBxsL88xXwSszp1%2FbVzqZNwxsxhcUk%2FWQyf&rsv_sug3=9&rsv_sug1=9&rsv_sug7=100&rsv_pq=c320342000026d8c&rsv_sug4=37523' -H 'is_referer: https://www.baidu.com/s?wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_sug3=7&rsv_sug1=7&rsv_sug7=100' --compressed | grep 百度为您找到相关结果约  | awk -F '结果约|个' '{print $2}'
  179  curl 'https://www.baidu.com/s?ie=utf-8&newi=1&mod=1&isbd=1&isid=c320342000026d8c&wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&oq=appium&rsv_t=118ekzbRi4edfq5DfZPbD1QmAD5WL6ViRtBxsL88xXwSszp1%2FbVzqZNwxsxhcUk%2FWQyf&rsv_sug3=9&rsv_sug1=9&rsv_sug7=100&rsv_pq=c320342000026d8c&rsv_sug4=37523&bs=appium&rsv_sid=24360_1427_24566_21109_18560_17001_20718&_ss=1&clist=34ac01c38af0fa11&hsug=&f4s=1&csor=6&_cr1=36846' -H 'Pragma: no-cache' -H 'is_xhr: 1' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' -H 'is_pbs: appium' -H 'Accept: */*' -H 'Cache-Control: no-cache' -H 'X-Requested-With: XMLHttpRequest'  -H 'Connection: keep-alive' -H 'Referer: https://www.baidu.com/s?wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&rqlang=cn&tn=baiduhome_pg&rsv_enter=0&oq=appium&rsv_t=118ekzbRi4edfq5DfZPbD1QmAD5WL6ViRtBxsL88xXwSszp1%2FbVzqZNwxsxhcUk%2FWQyf&rsv_sug3=9&rsv_sug1=9&rsv_sug7=100&rsv_pq=c320342000026d8c&rsv_sug4=37523' -H 'is_referer: https://www.baidu.com/s?wd=appium&rsv_spt=1&rsv_iqid=0xca5b91440002527c&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_sug3=7&rsv_sug1=7&rsv_sug7=100' --compressed | grep 百度为您找到相关结果约  | awk -F '结果约|个' '{print $2}' | sed 's#,##g'
  180  echo "1|2|3#4|5|6"
  181  echo "1|2|3#4|5|6#7|8|9"
  182  echo "1|2|3#4|5|6#7|8|9"  | awk 'BEGIN{RS="#"}{print NR}'
  183  echo "1|2|3#4|5|6#7|8|9"  | awk 'BEGIN{RS="#"}{print $1}'
  184  echo "1|2|3#4|5|6#7|8|9"  | awk 'BEGIN{RS="#";FS="|"}{print $1}'
  185  passwd
  186  useradd demo
  187  passwd demo
  188  echo xx | wc -l
  189  passwd demo
  190  echo "testerhome" | passwd demo
  191  echo -e  "testerhome\\ntesterhome" | passwd demo
关闭