( echo "# interface file auto-generated by buildroot"; echo ; echo "auto lo"; echo "iface lo inet loopback"; ) >./test.sh
cat test.sh
# interface file auto-generated by buildroot
auto lo
iface lo inet loopback
#!/bin/sh
DIR=$(pwd;ls)
#DIR=`pwd`
echo $DIR
算数运算使用的几种方式
#!/bin/sh
a=5
b=15
#error
#sum=`expr $a+$b`
#right
#sum=`expr $a + $b`
#let sum=$a+$b
#sum=$[$a+$b]
sum=$(($a+$b))
echo $sum
#if [ $a -lt $b ];then
#if [ $a -le $b ];then
#if [ $a -gt $b ];then
#if [ $a -ge $b ];then
#if [ $a -ne $b ];then
#if [ $a -eq $b ];then
#if [ $a == $b ];then
# echo "equal"
#else
# echo "no equal"
#fi
sum=$(($a+$b))