File: case-20-repeat-count.bash

package info (click to toggle)
lsof 4.99.4%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,924 kB
  • sloc: ansic: 50,680; sh: 8,351; makefile: 1,194; perl: 940; awk: 214
file content (19 lines) | stat: -rwxr-xr-x 402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
source tests/common.bash
# need gnu grep for -e in solaris
export PATH=/usr/gnu/bin:$PATH
base=$(pwd)

output=$(${lsof} -r 1c1 -p $$)
echo "$output" >> $report
if [ $(echo "$output" | grep -e '=======' | wc -l) != 1 ]; then
    exit 1
fi

output=$(${lsof} -r 1c5 -p $$)
echo "$output" >> $report
if [ $(echo "$output" | grep -e '=======' | wc -l) != 5 ]; then
    exit 1
fi

exit 0