aboutsummaryrefslogtreecommitdiff
path: root/convert.sh
blob: ba5aa9679b67f1842a8b5dc210af4481576db055 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

for f in $@; do
	if [ ! -f "$f" ]; then
		echo "File $f does not exist"
		exit 1
	fi
done

for f in $@; do
	while read -r line; do
		#c=$(cat "$f")
		c="$line"
		cc="$(./run-old convert -fin H48 -fout B32 -cubestr "$c" 2>/dev/null)"
		if [ -z "$cc" ]; then
			echo "$line"
		else
			echo "$cc=A"
		fi
	done < "$f" > "$f.new"
	mv "$f.new" "$f"
done

Generated with cgit - Back to sebastiano.tronto.net