getent_r.sh

来自「samba-3.0.22.tar.gz 编译smb服务器的源码」· Shell 代码 · 共 36 行

SH
36
字号
#!/bin/sh## Verify test output.  Basically we check to see if all the files generated# in /tmp by the get{pw,gr}ent_r.c and program are identical.  If there is# some problem with the re-entrancy of the code then the information in the# two files will be different.  #TYPE=$1ID=$2FILES="/tmp/${TYPE}_r-${ID}.out-*"# Sort filesfor file in $FILES; do    cat $file | sort > $file.sorteddone# Diff filesSORTED="/tmp/${TYPE}_r-${ID}.out-*.sorted"failed=0for file1 in $SORTED; do    for file2 in $SORTED; do        if [ $file1 != $file2 ]; then                diff $file1 $file2        fi    donedone# Clean uprm -f $SORTED

⌨️ 快捷键说明

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