File: grep-dev-null-out

package info (click to toggle)
grep 2.27-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,844 kB
  • ctags: 7,321
  • sloc: ansic: 69,540; sh: 10,958; perl: 564; makefile: 363; awk: 71; sed: 16
file content (13 lines) | stat: -rwxr-xr-x 263 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# Outputting to /dev/null.

. "${srcdir=.}/init.sh"; path_prepend_ ../src

require_timeout_

${AWK-awk} 'BEGIN {while (1) print "x"}' </dev/null |
  returns_ 124 timeout 1 grep x >/dev/null || fail=1

echo abc | grep b >>/dev/null || fail=1

Exit $fail