1294332Sdes# $OpenBSD: yes-head.sh,v 1.5 2015/03/03 22:35:19 markus Exp $ 298937Sdes# Placed in the Public Domain. 398937Sdes 498937Sdestid="yes pipe head" 598937Sdes 6294332Sdesfor p in ${SSH_PROTOCOLS}; do 7157016Sdes lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)` 898937Sdes if [ $? -ne 0 ]; then 998937Sdes fail "yes|head test failed" 1098937Sdes lines = 0; 1198937Sdes fi 1298937Sdes if [ $lines -ne 2000 ]; then 1398937Sdes fail "yes|head returns $lines lines instead of 2000" 1498937Sdes fi 1598937Sdesdone 16