]> git.nbdom.net Git - nb.git/commitdiff
help
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 23 May 2016 22:55:00 +0000 (23:55 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 23 May 2016 22:55:00 +0000 (23:55 +0100)
bin/dbq

diff --git a/bin/dbq b/bin/dbq
index fd703eed6e84d0db039c57edd6ac905df1321188..41bda7ab35389fafb718125a883c26641ad98d60 100755 (executable)
--- a/bin/dbq
+++ b/bin/dbq
@@ -332,7 +332,7 @@ sub help {
                return $v;
        }
 
-       $main::_DATA_ =~ s/([@\$][A-Z_]+)/pod_env($1)/eg;
+       $main::_DATA_ =~ s/([@\$][A-Z_a-z\{\}]+)/pod_env($1)/eg;
 
        # Create tmp
   my $in_file = (-e '/dev/shm' ? '/dev/shm' : '/tmp')."/$NAME.$$";
@@ -342,7 +342,7 @@ sub help {
        close $in;
 
        # Output
-       open(STDOUT,"|perl -pe 's/\.$$//g'".(($ENV{PAGER}||'') eq 'less' ? "|less -FRi" : ""));
+    open(STDOUT,"|perl -pe 's/\.$$//g'".(($ENV{PAGER}||'') eq 'less' ? "|less -FRi" : ""));
        my $opts = {
                -input => $in_file,
                -ouput => \*STDOUT,
@@ -450,23 +450,24 @@ Curl / Php query wrapper
  option[help|h|?]   Print a brief help message and exits.
  option[man]        Print the manual page and exits.
 
- Curl OPTIONS BETA:
+curl's OPTIONS:
 
-  'compressed|z!' => 1, # Request compressed response (using deflate or gzip)
-  'dump-header|D=s' => undef, # FILE  Write the headers to FILE
-  'get|G!' => undef, # Send the -d data with a HTTP GET (H)
-  'silent|s!' => 1, # Silent mode (don't output anything)
-  'header|H=s' => \@H, # LINE   Pass custom header LINE to server (H)
-  'netrc|n!' => 1, # Must read .netrc for user name and password
-  'insecure|k!' => undef, # Allow connections to SSL sites without certs (H)
-  'user-agent|A=s' => undef, # STRING  User-Agent to send to server (H)
-  'user|u=s' => undef, # USER[:PASSWORD]  Server user and password
+  --compressed, -z   Request compressed response (using deflate or gzip) (default: 1)
+  --dump-header, -D  FILE Write the headers to FILE
+  --get, -G          Send the -d data with a HTTP GET (H)
+  --silent, -s       Silent mode (don't output anything)
+  --header, -H       LINE Pass custom header LINE to server (H) (default: 1)
+  --netrc, -n        Must read .netrc for user name and password
+  --insecure, -k     Allow connections to SSL sites without certs (H)
+  --user-agent, -A   STRING User-Agent to send to server (H)
+  --user, -u=s       USER[:PASSWORD] Server user and password
 
 =cut
 
 =head1 EXAMPLES
 
-...
+Convert a database into sqlite:
+  dbq f=text a=db.dump db=wp db.type=sqlite | sqlite3 db.sqlite
 
 =head1 REQUIRES