Ubuntu Pastebin

Paste from guest at Thu, 30 Jun 2016 23:33:40 +0000

Download as text
 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
28
29
30
31
32
#!/bin/bash
OP='op-'
FILES=tests/input*.txt

if type ./lpmln >/dev/null 2>&1; then
	echo "Using executable found in current directory"
	exec=./lpmln
elif type lpmln >/dev/null 2>&1; then
	echo "Using executable available in system."
	exec=lpmln
else
	exit 1;

fi

success="true"

for f in $FILES
do
	if grep -q 'ASP' "$f"; then
		args=" -a "
	else
		args=" -f "
	fi
	name=$(echo $f | sed "s_.*\/__")
	$exec $args $f > /tmp/t
	c=$OP$name
	if ! cmp -s tests/$c /tmp/t
	then
		echo "$f" 
	fi   
done
Download as text