The last test

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The last test相关的知识,希望对你有一定的参考价值。

HWaddr = `ifconfig | grep "ether" | head -1 | awk ‘{ print $2 }‘` 查看 echo $HWaddr
vi memusage.sh
然后里边输入
#!bin/bash
free

保存退出
输入以下命令执行
sh memusage.sh
vi chkversion.sh
在里边输入
#!/bin/bash

zhu=`uname -r | awk -F. ‘{ print $1 }‘`
ci=`uname -r | awk -F. ‘{ print $2 }‘`
if [ $zhu -lt 2 ] || ( [ $zhu -eq 2 ] && [ $ci -lt 4 ] )
then
  echo "版本太低"
else
  echo `uname -r`
fi

最后执行
sh chkversion.sh
vi chkinstall.sh
在里边输入
#!/bin/bash
edition=`rpm -qa | grep ‘sysstat‘ | awk -F- ‘{ print $1 }‘`
if [ $edition = "sysstat" ]
then echo `rpm -qa | grep ‘sysstat‘`
else `yum -y install sysstat*`
fi

执行
sh chkinstall.sh
vi  sumint.sh
#!/bin/bash  
read -p "请输入一个小于100的数" num
sum1=0;
i=1;
while [ $i -le $num ]
do
    sum1=`expr $sum1 + $i`
    let i++
done

echo $sum1

执行
sh sumint.sh
下载测试包
wget https://archive.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.42-src.tar.gz

vi untar.sh
输入以下内容

#!/bin/bash
read -p "请输入文件的绝对路径和名称" path
type=`echo $path | awk -F‘.‘ ‘{ print $NF }‘`
#echo $type
case "$type" in
gz)
   tar -xzvf $path
   #echo gz
   ;;
bz2)
   tar -xjvf $path
   #echo bz2
   ;;
*)
echo "没有对应的解压方式"
esac

执行
sh untar.sh

以上是关于The last test的主要内容,如果未能解决你的问题,请参考以下文章

The last struggle

The last packet successfully received from the server was 20,519 milliseconds ago. The last packet

环境初始化 Build and Install the Apache Thrift IDL Compiler Install the Platform Development Tools(代码片段

The Last Waltz

maven web项目的web.xml报错The markup in the document following the root element must be well-formed.(代码片段

Second last week for the second last semester!