File: context-0

package info (click to toggle)
grep 3.11-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 16,392 kB
  • sloc: ansic: 95,031; sh: 12,720; perl: 606; makefile: 386; awk: 71; sed: 16
file content (27 lines) | stat: -rwxr-xr-x 446 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# 0 lines of context
. "${srcdir=.}/init.sh"; path_prepend_ ../src

cat <<EOF > in || framework_failure_
needle
1st line of context
2nd line of context
3rd line of context
another needle
5th line of context relative to first match
6th line...
EOF

cat <<EOF > exp || framework_failure_
needle
--
another needle
EOF

fail=0
grep -C 0 needle in > out 2>err || fail=1

compare exp out || fail=1
compare /dev/null err || fail=1

Exit $fail