mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Nathan Keynes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52721 91177308-0d34-0410-b5e6-96231b3b80d8
		
			
				
	
	
		
			18 lines
		
	
	
		
			324 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			324 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
#
 | 
						|
# Program: count
 | 
						|
#
 | 
						|
# Synopsis: Count the number of lines of input on stdin and test that it
 | 
						|
#           matches the specified number.
 | 
						|
#
 | 
						|
# Syntax:   count <number>
 | 
						|
 | 
						|
set -e
 | 
						|
set -u
 | 
						|
input_lines=`wc -l`
 | 
						|
if [ "$input_lines" -ne "$1" ]; then
 | 
						|
  echo "count: expected $1 lines and got ${input_lines}."
 | 
						|
  exit 1
 | 
						|
fi
 | 
						|
exit 0
 |