From 66c0168f4d5547c49d327a0485cb8a5359e085a9 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Tue, 8 Mar 2011 00:47:39 +0100 Subject: [PATCH] sql: man-page uses consistent examples --- configure | 20 ++++++++++---------- configure.ac | 2 +- doc/FUTURE_IDEAS | 16 ---------------- doc/release_new_version | 6 +++++- src/parallel | 2 +- src/sql | 42 ++++++++++++++++++++--------------------- 6 files changed, 38 insertions(+), 50 deletions(-) diff --git a/configure b/configure index cc0c377c..0f645528 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for parallel 20110205. +# Generated by GNU Autoconf 2.67 for parallel 20110308. # # Report bugs to . # @@ -551,8 +551,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='parallel' PACKAGE_TARNAME='parallel' -PACKAGE_VERSION='20110205' -PACKAGE_STRING='parallel 20110205' +PACKAGE_VERSION='20110308' +PACKAGE_STRING='parallel 20110308' PACKAGE_BUGREPORT='bug-parallel@gnu.org' PACKAGE_URL='' @@ -1168,7 +1168,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures parallel 20110205 to adapt to many kinds of systems. +\`configure' configures parallel 20110308 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1234,7 +1234,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of parallel 20110205:";; + short | recursive ) echo "Configuration of parallel 20110308:";; esac cat <<\_ACEOF @@ -1301,7 +1301,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -parallel configure 20110205 +parallel configure 20110308 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1318,7 +1318,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by parallel $as_me 20110205, which was +It was created by parallel $as_me 20110308, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2133,7 +2133,7 @@ fi # Define the identity of the package. PACKAGE='parallel' - VERSION='20110205' + VERSION='20110308' cat >>confdefs.h <<_ACEOF @@ -2684,7 +2684,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by parallel $as_me 20110205, which was +This file was extended by parallel $as_me 20110308, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2746,7 +2746,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -parallel config.status 20110205 +parallel config.status 20110308 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 04870ac7..c2eb2a95 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([parallel], [20110205], [bug-parallel@gnu.org]) +AC_INIT([parallel], [20110308], [bug-parallel@gnu.org]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ diff --git a/doc/FUTURE_IDEAS b/doc/FUTURE_IDEAS index 50ae559e..b30909ce 100644 --- a/doc/FUTURE_IDEAS +++ b/doc/FUTURE_IDEAS @@ -1,21 +1,5 @@ -Use recsep as splitstring instead of match -my @vals = (split / /, $string)[0,2,5,7]; - test if block size is too small to match a record sep in both -N mode and normal - - - ---remove-rec-sep -test alternation with --recend 'a|b' -echo 12a34a45a6 | src/parallel -k --pipe --recend a -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo' -echo 12a34b45a6 | src/parallel -k --pipe --recend 'a|b' -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo' -echo 12a34b45a6 | src/parallel -k --pipe --recend 'b' -N1 --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo' - -echo 12a34a45a6 | src/parallel -k --pipe --recend a --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo' -echo 12a34b45a6 | src/parallel -k --pipe --recend 'a|b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo' -echo 12a34b45a6 | src/parallel -k --pipe --recend 'b' --rrs 'echo -n "$PARALLEL_SEQ>"; cat; echo' - Example: Chop mbox into emails Parallel sort diff --git a/doc/release_new_version b/doc/release_new_version index 371e4235..54f414e3 100644 --- a/doc/release_new_version +++ b/doc/release_new_version @@ -138,7 +138,8 @@ cc:Peter Simons , Sandro Cazzaniga , Rogério Brito , Jonathan Palardy , Koen Vervloesem , R. Tyler Croy , ryoichiro.suzuki@gmail.com,kerick@shiftedbit.net, - Christian Faulhammer , Ryoichiro Suzuki + Christian Faulhammer , Ryoichiro Suzuki , + Jesse Alama Subject: GNU Parallel 2011XXXX released @@ -166,6 +167,9 @@ New in this release: but insert 0 arguments on the command line. Useful if you just want to run the same command with the same arguments a number of times. +* GNU Parallel is now in Fink. Thanks to Jesse Alama. + http://pdb.finkproject.org/pdb/package.php/parallel + * Opscode Cookbook for Chef. Thanks to Joshua Timberman. https://github.com/opscode/cookbooks/tree/master/gnu_parallel diff --git a/src/parallel b/src/parallel index 2f1f0af5..2386d893 100755 --- a/src/parallel +++ b/src/parallel @@ -381,7 +381,7 @@ sub get_options_from_array { sub parse_options { # Returns: N/A # Defaults: - $Global::version = 20110224; + $Global::version = 20110301; $Global::progname = 'parallel'; $Global::infinity = 2**31; $Global::debug = 0; diff --git a/src/sql b/src/sql index 2c1f3ab9..342c685a 100755 --- a/src/sql +++ b/src/sql @@ -39,16 +39,16 @@ See the section DBURL below. The SQL commands to run. Each argument will have a newline appended. -Example: "SELECT 1+2;" "SELECT 'SQL';" +Example: "SELECT * FROM foo;" "SELECT * FROM bar;" If the arguments contain '\n' or '\x0a' this will be replaced with a newline: -Example: "SELECT 1+2;\n SELECT 'SQL';" +Example: "SELECT * FROM foo;\n SELECT * FROM bar;" If no commands are given SQL is read from the keyboard or STDIN. -Example: echo 'SELECT 1+2;' | sql mysql:/// +Example: echo 'SELECT * FROM foo;' | sql mysql:/// =item B<--db-size> @@ -104,7 +104,7 @@ The string following -p will be given to the database connection program as arguments. Multiple -p's will be joined with space. Example: -I<-p "-U username"> can also be written I<-p -U -p username>. +I<-p "-U scott"> can also be written I<-p -U -p scott>. =item B<-r> @@ -153,7 +153,7 @@ GNU B can be called as a shebang (#!) command as the first line of a script #!/usr/bin/sql -Y mysql:/// - select * from users; + SELECT * FROM foo; For this to work B<--shebang> or B<-Y> must be set as the first option. @@ -169,12 +169,12 @@ http://tools.ietf.org/html/rfc3986#section-2.1 (E.g. a password containing '/' would contain '%2F'). Examples: - mysql://user:pa55w0rd@mysqlserver/database - sql:oracle://scott:tiger@oracleserver/xe - postgresql://user:pa55w0rd@pg.example.com/db + mysql://scott:tiger@my.example.com/mydb + sql:oracle://scott:tiger@ora.example.com/xe + postgresql://scott:tiger@pg.example.com/pgdb pg:/// - sql:sqlite2:////tmp/db.sqlite?select * from foo; - sqlite3:///../db.sqlite3?select%20*%20from%20foo; + sql:sqlite2:////tmp/db.sqlite?SELECT * FROM foo; + sqlite3:///../db.sqlite3?SELECT%20*%20FROM%20foo; Currently supported vendors: MySQL (mysql), MySQL with SSL (mysqls, mysqlssl), Oracle (oracle, ora), PostgreSQL (postgresql, pg, pgsql, @@ -188,8 +188,8 @@ Aliases must start with ':' and are read from Example of aliases: - :myalias1 pg://user:pa55w0rd@pg.example.com/db - :myalias2 ora://scott:tiger@ora1.example.com/xe + :myalias1 pg://scott:tiger@pg.example.com/pgdb + :myalias2 ora://scott:tiger@ora.example.com/xe # Short form of mysql://`whoami`:nopassword@localhost:3306/`whoami` :myalias3 mysql:/// # Short form of mysql://`whoami`:nopassword@localhost:33333/mydb @@ -197,9 +197,9 @@ Example of aliases: # Alias for an alias :m :myalias4 # the sortest alias possible - : sqlite2:////tmp/mydefault.sqlite + : sqlite2:////tmp/db.sqlite # Including an SQL query - :query sqlite:////tmp/file.sqlite?SELECT * FROM foo; + :query sqlite:////tmp/db.sqlite?SELECT * FROM foo; =head1 EXAMPLES @@ -207,7 +207,7 @@ Example of aliases: The most basic use of GNU B is to get an interactive prompt: -B +B If you have setup an alias you can do: @@ -218,16 +218,16 @@ B To run a query directly from the command line: -B +B Oracle requires newlines after each statement. This can be done like this: -B +B Or this: -B +B =head2 Copy a PostgreSQL database @@ -235,7 +235,7 @@ B To copy a PostgreSQL database use pg_dump to generate the dump and GNU B to import it: -B +B =head2 Empty all tables in a MySQL database @@ -263,7 +263,7 @@ UNIX-script. Create a script called I: B<#!/usr/bin/sql -Y mysql:///> -B Then do: @@ -274,7 +274,7 @@ B Use GNU B's B<--colsep> to separate columns: -B +B =head2 Retry if the connection fails