{
char buf[1000];
printf ("First line of %%A:\n");
- sprintf (buf, "head -1 %s", destination_file_name); system (buf);
+ sprintf (buf, "head -n 1 %s", destination_file_name); system (buf);
printf ("First line of %%B:\n");
- sprintf (buf, "head -1 %s", other_file_name); system (buf);
+ sprintf (buf, "head -n 1 %s", other_file_name); system (buf);
printf ("Guessing calling convention: %s\n",
downstream
? "%A = modified by user, %B = upstream"
case 'C': signal (SIGPIPE, handler); break;
}
- /* Produce infinite output. Since it is piped into "head -1", the writes
+ /* Produce infinite output. Since it is piped into "head -n 1", the writes
must ultimately fail. */
for (;;)
{
# Test signal's default behaviour.
tmpfiles="$tmpfiles t-sigpipeA.tmp"
-${CHECKER} ./test-sigpipe${EXEEXT} A 2> t-sigpipeA.tmp | head -1 > /dev/null
+${CHECKER} ./test-sigpipe${EXEEXT} A 2> t-sigpipeA.tmp | head -n 1 > /dev/null
if test -s t-sigpipeA.tmp; then
LC_ALL=C tr -d '\r' < t-sigpipeA.tmp
rm -fr $tmpfiles; exit 1
# Test signal's ignored behaviour.
tmpfiles="$tmpfiles t-sigpipeB.tmp"
-${CHECKER} ./test-sigpipe${EXEEXT} B 2> t-sigpipeB.tmp | head -1 > /dev/null
+${CHECKER} ./test-sigpipe${EXEEXT} B 2> t-sigpipeB.tmp | head -n 1 > /dev/null
if test -s t-sigpipeB.tmp; then
LC_ALL=C tr -d '\r' < t-sigpipeB.tmp
rm -fr $tmpfiles; exit 1
# Test signal's behaviour when a handler is installed.
tmpfiles="$tmpfiles t-sigpipeC.tmp"
-${CHECKER} ./test-sigpipe${EXEEXT} C 2> t-sigpipeC.tmp | head -1 > /dev/null
+${CHECKER} ./test-sigpipe${EXEEXT} C 2> t-sigpipeC.tmp | head -n 1 > /dev/null
if test -s t-sigpipeC.tmp; then
LC_ALL=C tr -d '\r' < t-sigpipeC.tmp
rm -fr $tmpfiles; exit 1