#!/bin/sh
#
# test various shsql(1) command line option combinations

echo "******************************************************-"
echo "1. plain format, with field name header.."
shsql -h "select * from curcits where pmid like '107*' order by pmid num"

echo "******************************************************-"
echo "2. -n nice format.."
shsql -n "select * from curcits where pmid like '107*' order by pmid num"

echo "******************************************************-"
echo "3. -tagvalue format.."
shsql -tagvalue "select * from curcits where pmid like '107*' order by pmid num"

echo "******************************************************-"
echo "4. -html table format.."
shsql -html "select * from curcits where pmid like '107*' order by pmid num"

echo "******************************************************-"
echo "5. -xml format.."
shsql -xml "select * from curcits where pmid like '107*' order by pmid num"

echo "******************************************************-"
echo "6. output delimited by backquote, with field name header.."
shsql -h -delim \` "select * from curcits where pmid like '107*' order by pmid num"

echo "******************************************************-"
echo "7. -l option to truncate long output fields.. "
shsql -n -l 40 "select authorlist, title from journalcits where authorlist contains 'smith' order by pmid num, authorlist"
