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

📄 sysv

📁 实战Linux编程的原代码,希望对学驱动的人能有所帮助
💻
字号:
#!/bin/sh# make sure `sum -s' works for input whose sum of bytes is larger than 2^32if test "$VERBOSE" = yes; then  set -x  sum --versionficase "$PERL" in  *'missing perl')  echo 1>&2 "$0: configure didn't find a usable version of Perl, so can't run this test"  exit 77  ;;esac# Avoid a problem when run in a UTF-8 locale.# Otherwise, Perl would try to (and fail to) interpret# each string below as a sequence of multi-byte characters.LC_ALL=Cexport LC_ALLpwd=`pwd`tmp=sum-s.$$trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0trap '(exit $?); exit' 1 2 13 15framework_failure=0mkdir $tmp || framework_failure=1cd $tmp || framework_failure=1if test $framework_failure = 1; then  echo 'failure in testing framework' 1>&2  (exit 1); exitfifail=0# FYI, 16843009 is floor (2^32 / 255).# aka: perl -e 'print chr(255) x 16843009'$PERL -e '$s = chr(255) x 65537; foreach (1..257) {print $s}' \  | sum -s > out || fail=1cat > exp <<\EOF65535 32897EOFcmp out exp || fail=1test $fail = 1 && diff out exp 2> /dev/nullrm -f out exp# aka: perl -e 'print chr(255) x 16843010'$PERL -e '$s = chr(255) x 65537; foreach (1..257) {print $s}; print chr(255)' \  | sum -s > out || fail=1cat > exp <<\EOF254 32897EOFcmp out exp || fail=1test $fail = 1 && diff out exp 2> /dev/null(exit $fail); exit

⌨️ 快捷键说明

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