⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ir-1

📁 实战Linux编程的原代码,希望对学驱动的人能有所帮助
💻
字号:
#!/bin/shtest=ir-1if test "$VERBOSE" = yes; then  set -x  rm --versionfipwd=`pwd`t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0trap '(exit $?); exit' 1 2 13 15test_failure=0mkdir -p $tmp $tmp/a $tmp/b $tmp/c || test_failure=1> $tmp/a/a || test_failure=1> $tmp/b/bb || test_failure=1> $tmp/c/cc || test_failure=1if test $test_failure = 1; then  echo 'failure in testing framework'  exit 1ficat <<EOF > $test.IyyyyyyyynnnEOF# Remove all but one of a, b, c -- I doubt that this test can portably# determine which one was removed based on order of dir entries.# This is a good argument for switching to a dejagnu-style test suite.fail=0rm --verbose -i -r $tmp < $test.I > /dev/null 2>&1 || fail=1# $tmp should not have been removed.test -d $tmp || fail=1# There should be only one directory left.case `echo $tmp/*` in  $tmp/[abc]) ;;  *) fail=1 ;;esacrm -rf $tmp $test.I(exit $fail); exit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -