#!/usr/bin/env bash
if [ $# -eq 1 ]; then
  filename=${1%.csv}.table
elif [ $# -eq 2 ]; then
  filename=csv/${1}-csv/${2}.table
else
  echo "Usage: ./tables/view csv/XXX-csv/YYY.csv OR ./tables/view XXX YYY"
  exit 1
fi
[ -f filename ] || filename=lib/data/WikiTableQuestions/$filename
view -c "set nowrap" $filename
