# *********************************************************************
#  Written by and copyright Carlo Strozzi <carlos@linux.it>.
#
#  tabletosh.txt: help text
#  Copyright (C) 2001 Carlo Strozzi <carlos@linux.it>
# 
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
# 
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
# 
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# *********************************************************************

                      NoSQL operator: tabletosh

Converts a NoSQL table into sh(1) variable assignments.

Usage: tabletosh [options]

Options:
    --input (-i) 'file'
      Read input from 'file' instead of STDIN.

    --output (-o) 'file'
      Write output to 'file' instead of STDOUT.

    --help (-h)
      Display this help text.

    --prefix (-p) 'string'
      Prefix each default output column name with 'string'.

    --compute (-c)
      Print output assignments in 'compute' format.

    --trim (-t)
      Strip surrounding blanks from variable values.

    --trunc (-T) 'n'
      Truncate field values to 'n' characters.

    --key (-K) 'string'
      Pick only the input record where key equals 'string'.

    --strip-names (-s) 'pattern'
      Strip 'pattern' from variable names on output.

    --export (-e)
      Export the output assignments to the shell environment.

    --readonly (-R)
      Make the output assignments read-only.

    --max-cols (-C) 'n'
      Pick at most the first 'n' input columns.

    --max-rows (-L) 'n'
      Pick at most the first 'n' input rows.

Notes:

Converts a NoSQL table into shell assignments in the form
VARIABLE="value" - handy for grabbing the values into a shell
program. If the input table contains more than one row of data,
only the last one will become effective (see also option '-K').

                eval "$(nosql tabletosh < table)"

Always use double quotes around the eval'ed command, to preserve
embedded newlines in assigned values.

$Id$
