File: skip-device

package info (click to toggle)
grep 3.11-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,392 kB
  • sloc: ansic: 95,031; sh: 12,720; perl: 606; makefile: 386; awk: 71; sed: 16
file content (16 lines) | stat: -rwxr-xr-x 416 bytes parent folder | download | duplicates (7)
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