File: skip-device

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 (16 lines) | stat: -rwxr-xr-x 416 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# grep must ignore --devices=ACTION (-D) when reading stdin
# For grep-2.11, this test would fail.

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

# Test both with no file argument, and with "-".
echo foo | grep -D skip foo - || fail=1
echo foo | grep --devices=skip foo || fail=1

require_timeout_
mkfifo myfifo || framework_failure_
timeout 10 grep -D skip foo myfifo
test $? -eq 1 || fail=1

Exit $fail