repo.or.cz
/
llvm
/
msp430.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Improve compatibility with older versions of Windows.
[llvm/msp430.git]
/
test
/
Scripts
/
count
blob
1c3d7e0953b2c8fcbdaa7a689d975470023073b1
1
#!/bin/sh
2
#
3
# Program: count
4
#
5
# Synopsis: Count the number of lines of input on stdin and test that it
6
# matches the specified number.
7
#
8
# Syntax: count <number>
9
10
set -e
11
set -u
12
input_lines
=
`wc -l`
13
if
[
"
$input_lines
"
-ne
"
$1
"
];
then
14
echo
"count: expected
$1
lines and got
${input_lines}
."
15
exit
1
16
fi
17
exit
0