一级标题
二级标题
三级标题
四级标题
五级标题
六级标题
#######七级标题
########八级标题
#!/bin/bash
declare -i evenSum=0
declare -i i=2
while [ $i -le 100 ]; do
let evenSum+=$i
let i+=2
done
echo $evenSu
#!/bin/bash
#
cat << EOF
cpu)print cpu information
mem)print memory information
disk)print disk information
quit)quit
Enter your option
EOF
read -p "Enter your option: " option
option=`echo $option | tr 'A-Z' 'a-z'`
while [[ "$option" != "quit" ]]; do
if [[ "$option" == "cpu" ]]; then
cat /proc/cpuinfo
elif [[ "$option" == "mem" ]]; then
free -m
elif [[ "$option" == "disk" ]]; then
df -h
else
echo "Wrong option..."
fi
read -p "Enter your option again: " option
option=`echo $option | tr 'A-Z' 'a-z'`
done