test.sh

      1 #! /bin/sh                                                                                                  
      2 A=0
      3 if [ ! -e test.bin ]
      4     then
      5         make
      6         A=1
      7 fi
      8
      9 mipsel-linux-objdump -D -m mips -b binary -EL -M no-aliases -z test.bin >my.dump
     10
     11 if [ $A = 1 ]
     12     then
     13         rm sramboot.o *bin *exe
     14 fi
sh -e 如果一个命令失败就立即退出

sh -n 读入命令但是不执行它们

sh -u 置换时把未设置的变量看作出错

sh -v 当读入shell输入行时把他们显示出来

sh -x执行命令时把命令和它们的参数显示出来

相关文章:

  • 2021-09-30
  • 2021-12-27
  • 2021-04-02
  • 2022-01-17
  • 2022-02-27
  • 2022-02-16
  • 2022-02-11
猜你喜欢
  • 2021-11-08
  • 2022-02-14
  • 2021-10-17
相关资源
相似解决方案