@@ -9,15 +9,15 @@ wideb_pbm=${tmpdir}/wideb.pbm
9
9
10
10
pbmtog3 -nofixedwidth testgrid.pbm | \
11
11
g3topbm -width=14 | cmp -s - testgrid.pbm
12
- echo $?
12
+ echo ${PIPESTATUS[@]} " : " $ ?
13
13
14
14
pbmtog3 -nofixedwidth -reversebits testgrid.pbm | \
15
15
g3topbm -width=14 -reversebits | cmp -s - testgrid.pbm
16
- echo $?
16
+ echo ${PIPESTATUS[@]} " : " $ ?
17
17
18
18
pbmtog3 testgrid.pbm | \
19
19
g3topbm | pnmcrop -white -right -bottom | \
20
- cmp -s - testgrid.pbm ; echo $?
20
+ cmp -s - testgrid.pbm ; echo ${PIPESTATUS[@]} " : " $ ?
21
21
22
22
# works with gawk and mawk
23
23
# produce all possible 8-bit patterns
@@ -28,31 +28,31 @@ LC_ALL=C awk 'BEGIN { print "P4"; # header
28
28
printf("%c",i) }' > ${complete256_pbm}
29
29
30
30
pbmtog3 -nofixedwidth ${complete256_pbm} | g3topbm -width=8 | \
31
- cmp -s - ${complete256_pbm} ; echo $?
31
+ cmp -s - ${complete256_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
32
32
33
33
pbmtog3 -reverse -nofixedwidth ${complete256_pbm} | \
34
34
g3topbm -reversebits -width=8 | \
35
- cmp -s - ${complete256_pbm} ; echo $?
35
+ cmp -s - ${complete256_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
36
36
37
37
pbmtog3 -align8 ${complete256_pbm} | \
38
38
g3topbm -width=1728 | pnmcrop -white -right | \
39
- cmp -s - ${complete256_pbm} ; echo $?
39
+ cmp -s - ${complete256_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
40
40
41
41
pbmtog3 -align16 ${complete256_pbm} | \
42
42
g3topbm -width=1728 | pnmcrop -white -right | \
43
- cmp -s - ${complete256_pbm} ; echo $?
43
+ cmp -s - ${complete256_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
44
44
45
45
pbmmake -w 5000 5 > ${widew_pbm}
46
46
pbmtog3 -nofixedwidth ${widew_pbm} | g3topbm | \
47
- cmp -s - ${widew_pbm} ; echo $?
47
+ cmp -s - ${widew_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
48
48
49
49
pbmtog3 -nofixedwidth ${widew_pbm} | \
50
50
g3topbm -width=5000 | \
51
- cmp -s - ${widew_pbm} ; echo $?
51
+ cmp -s - ${widew_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
52
52
53
53
pbmmake -b 5000 5 > ${wideb_pbm}
54
54
pbmtog3 -nofixedwidth ${wideb_pbm} | g3topbm | \
55
- cmp -s - ${wideb_pbm} ; echo $?
55
+ cmp -s - ${wideb_pbm} ; echo ${PIPESTATUS[@]} " : " $ ?
56
56
57
57
cat ${complete256_pbm} | cksum
58
58
cat ${wideb_pbm} | cksum
0 commit comments