1CGI_TO_DB(1)          User Contributed Perl Documentation         CGI_TO_DB(1)
2
3
4

NAME

6       cgi_to_db - convert stored CGI files (from CGI.pm) to fsdb
7

SYNOPSIS

9           cgi_to_db [-duU] [-e EmptyValue] [cgi-files...]
10

DESCRIPTION

12       Converts all stored CGI files (from CGI.pm) to fsdb, optionally
13       unescaping the contents.  When contents are unescaped, CR NL is recoded
14       as ``\n''.
15
16       Output is always in fsdb list format with double space (type ``S'')
17       field separator.
18
19       Unlike most Fsdb programs, the input to this program is not usually
20       from standard input.  However, the program will take "-i" options.
21
22       This program requires temporary storage equal to the size of the data
23       (so that it can handle the case of different entries having different
24       headers).
25

OPTIONS

27       -u or --unescape
28           do unescape data, converting CGI escape codes like %xx to regular
29           characters (default)
30
31       -U or --nounescape
32           do not unescape data, but leave it CGI-encoded
33
34       -e E or --empty E
35           give value E as the value for empty (null) records
36
37       -T TmpDir
38           where to put tmp files.  Also uses environment variable TMPDIR, if
39           -T is not specified.  Default is /tmp.
40
41       This module also supports the standard fsdb options:
42
43       -d  Enable debugging output.
44
45       -i or --input InputSource
46           Read from InputSource, typically a file name, or "-" for standard
47           input, or (if in Perl) a IO::Handle, Fsdb::IO or Fsdb::BoundedQueue
48           objects.
49
50       -o or --output OutputDestination
51           Write to OutputDestination, typically a file name, or "-" for
52           standard output, or (if in Perl) a IO::Handle, Fsdb::IO or
53           Fsdb::BoundedQueue objects.
54
55       --autorun or --noautorun
56           By default, programs process automatically, but Fsdb::Filter
57           objects in Perl do not run until you invoke the run() method.  The
58           "--(no)autorun" option controls that behavior within Perl.
59
60       --help
61           Show help.
62
63       --man
64           Show full manual.
65

SAMPLE USAGE

67   Input:
68       file A (TEST/cgi_to_db_ex.in):
69
70           name=test
71           id=111-11-1111
72           email=test%40usc.edu
73           submit_time=Tue%20Jan%2014%2011%3A32%3A39%202003
74           =
75
76       file B (TEST/cgi_to_db_ex.in-2):
77
78           name=test2
79           id=222-22-2222
80           email=test2%40usc.edu
81           newfield=foo
82           emptyfield=
83           submit_time=Tue%20Jan%2024%2022%3A32%3A39%202003
84           =
85
86   Command:
87           cgi_to_db TEST/cgi_to_db_ex.in TEST/cgi_to_db_ex.in-2
88
89   Output:
90           #fsdb -R C -F S name id email submit_time newfield emptyfield
91           name:  test
92           id:  111-11-1111
93           email:  test\@usc.edu
94           submit_time:  Tue Jan 14 11:32:39 2003
95
96           name:  test2
97           id:  222-22-2222
98           email:  test2\@usc.edu
99           newfield:  foo
100           emptyfield:  -
101           submit_time:  Tue Jan 24 22:32:39 2003
102
103           #  | cgi_to_db TEST/cgi_to_db_ex.in TEST/cgi_to_db_ex.in-2
104

SEE ALSO

106       Fsdb.  CGI(3pm).  <http://stein.cshl.org/boulder/>.
107       <http://stein.cshl.org/WWW/software/CGI/>
108
110       Copyright (C) 1991-2018 by John Heidemann <johnh@isi.edu>
111
112       This program is distributed under terms of the GNU general public
113       license, version 2.  See the file COPYING with the distribution for
114       details.
115
116
117
118perl v5.34.0                      2021-07-22                      CGI_TO_DB(1)
Impressum