?? deref
字號:
#!/bin/sh# see if chgrp can change the group of a symlinkif test "$VERBOSE" = yes; then set -x chgrp --versionfi. $srcdir/../group-namespwd=`pwd`tmp=slink.$$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); exitfiset _ $groups; shiftg1=$1g2=$2touch fln -s f symlinkchgrp $g2 symlink 2> /dev/nullset _ `ls -l symlink`g=$5test "$g" = $g2 || { cat <<EOF 1>&2$0: skipping this test; your system doesn't support changingthe owner or group of a symbolic link.EOF (exit 77); exit}fail=0chgrp $g1 fset _ `ls -l f`; g=$5; test "$g" = $g1 || fail=1chgrp $g2 symlink || fail=1set _ `ls -l f`; g=$5; test "$g" = $g1 || fail=1set _ `ls -l symlink`; g=$5; test "$g" = $g2 || fail=1# This should not change the group of f.chgrp $g2 symlink || fail=1set _ `ls -l f`; g=$5; test "$g" = $g1 || fail=1set _ `ls -l symlink`; g=$5; test "$g" = $g2 || fail=1chgrp $g2 fset _ `ls -l f`; g=$5; test "$g" = $g2 || fail=1# This *should* change the group of f.# Though note that the diagnostic you'd get with -c is misleading in that# it says the `group of `symlink'' has been changed.chgrp --dereference $g1 symlinkset _ `ls -l f`; g=$5; test "$g" = $g1 || fail=1set _ `ls -l symlink`; g=$5; test "$g" = $g2 || fail=1(exit $fail); exit
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -