标签:val failure bin logs hello ret fail div size
判定方式
#!/bin/bash dd if=hello of=hello.c 2> result.dd retval=`grep "copied" result.dd | awk ‘{print $1}‘` filesize=`ls -l ./ | grep ‘hello.sh‘ |awk ‘{print $5}‘` # echo retval: $retval # echo filesize: $filesize if [ $retval -eq $filesize ]; then echo result: pass else echo result: failure fi exit 0
标签:val failure bin logs hello ret fail div size
原文地址:http://www.cnblogs.com/aaronLinux/p/7688068.html