]> www.ljiriste.work Git - parsing_table_generator/commitdiff
Add a script for reading of the output table
authorLukáš Jiřiště <redacted>
Wed, 18 Mar 2026 20:14:58 +0000 (21:14 +0100)
committerLukáš Jiřiště <redacted>
Wed, 18 Mar 2026 20:14:58 +0000 (21:14 +0100)
show_table.sh [new file with mode: 0755]

diff --git a/show_table.sh b/show_table.sh
new file mode 100755 (executable)
index 0000000..3d29cec
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ "$#" -ne 1 ]; then
+       echo "You must provide the parsing table" >&2
+       exit 1
+fi
+if ! [ -e "$1" ]; then
+       echo "The file" $1 "does not exist." >&2
+       exit 2
+fi
+column -s ';' -t -c 0 -o ' | ' "$1" | less -S