ANNOUNCE: ParBASH 0.1 release - parallel processing in BASH

2009-07-20 Thread Milenko Petrovic
Hello, I'd like to announce the release of the 0.1 version of ParBASH. Using ParBASH, it is possible to write bash scripts that can be automatically parallelized on SMP, multicore, and distributed systems using Apache Hadoop. Here is an example script to find top 10 references for Barack Obama p

Re: Help with script - doesn't work properly from cron

2009-07-20 Thread Erik Olof Wahlstrom
Thanks everyone for your pointers - I ended up with this: #!/bin/bash BACKUP_DIR="/media/disk/AUTOMATED_BACKUPS/DB_DAILY" CURRENT_DIR=$BACKUP_DIR/`date +%d` DATABASES="$(mysql -uroot -pNewSecretPw -Bse 'show databases')" echo 'Backing up databases: '$DATABASES cd / rm -rf "$CURRENT_DIR" mkdir

Re: 3-lines long segfault

2009-07-20 Thread Marc Herbert
trap "echo USR1caught" USR1 read -t 1 foo=$( kill -USR1 $$ ) echo 'Yeah! no Segmentation fault!' >>> Thanks for the report. >> Thanks for bash in the first place. >> >> >>> Fixed in the next version. >> Chet, is there any workaround for existing versions? > > Sure. There's th

Re: 3-lines long segfault

2009-07-20 Thread Chet Ramey
Marc Herbert wrote: > Chet Ramey a écrit : >> Marc Herbert wrote: >>> The following script crashes bash versions 2.05, 3.2.25, 4.0.16,... >>> >>> >>> trap "echo USR1caught" USR1 >>> read -t 1 >>> foo=$( kill -USR1 $$ ) >>> echo 'Yeah! no Segmentation fault!' >> Thanks for the report. > > Thanks fo

Re: Help with script - doesn't work properly from cron

2009-07-20 Thread Bob Proulx
Greg Wooledge wrote: > Erik Olof Wahlstrom wrote: > > /usr/bin/mysqldump -uroot -pHardAsMySql321 "$DB" | bzip2 > > > "$DB"_`date +%Y-%m-%d_%k.%M`".sql.bz2" > > # Long line, probably broken by your mailer. For clarity, I'd ># write it on two lines explicitily: > >

Re: bash 4.x filters out environmental variables containing a dot in the name

2009-07-20 Thread Christian Krause
Hi Chet, Chet Ramey wrote: > Posix also says that "variables" are inherited from the environment. That > word has a very specific meaning, as was reiterated during the $@ and set -u > discussion. The same "variables" language is used when Posix talks about > creating the environment for shell ex

Re: 3-lines long segfault

2009-07-20 Thread Marc Herbert
Chet Ramey a écrit : > Marc Herbert wrote: >> The following script crashes bash versions 2.05, 3.2.25, 4.0.16,... >> >> >> trap "echo USR1caught" USR1 >> read -t 1 >> foo=$( kill -USR1 $$ ) >> echo 'Yeah! no Segmentation fault!' > > Thanks for the report. Thanks for bash in the first place. > F

Patch to make readline parse CSI keycodes properly

2009-07-20 Thread Andy Koppe
Hi, This is about a small problem with readline that has long been bugging me: when pressing an unbound key or key combination in bash and other readline programs, somewhat cryptic characters are often inserted into the command line. For example, you might get "~" for Insert, "4~" for F12, or ";5A

Re: [OT] regarding 'time' builtin

2009-07-20 Thread Chet Ramey
Greg Wooledge wrote: > On Fri, Jul 17, 2009 at 06:42:03PM -0400, Chris Jones wrote: >> Sometimes I wonder if Greg is a "real" person.. not a smart program that >> can generate the correct answers to all the questions you had about bash >> utilization - and may have been too shy to ask. > > Either

Re: Help with script - doesn't work properly from cron

2009-07-20 Thread Greg Wooledge
On Fri, Jul 17, 2009 at 02:53:21PM -0700, Erik Olof Wahlstrom wrote: > #!/bin/bash > BACKUP_DIR="/media/disk/AUTOMATED_BACKUPS/DB_DAILY" > > CURRENT_DIR=$BACKUP_DIR/`date +%d` # See how you call date here without an explicit path? That's good. > DATABASES="$(/usr/bin/mysql -uUsername -pPasswo

Re: [OT] regarding 'time' builtin

2009-07-20 Thread Greg Wooledge
On Fri, Jul 17, 2009 at 06:42:03PM -0400, Chris Jones wrote: > Sometimes I wonder if Greg is a "real" person.. not a smart program that > can generate the correct answers to all the questions you had about bash > utilization - and may have been too shy to ask. Either I'm a real person, or I'm a br

Re: Setting READLINE_POINT isn't always applied (4.0.24)

2009-07-20 Thread Henning Bekel
Chet Ramey wrote: > Henning Bekel wrote: >> Hello, >> If I try to change READLINE_LINE and READLINE_POINT from a >> function bound via bind -x, then setting READLINE_POINT is not >> applied every second time I invoke the function. Instead, the >> cursor is placed at the end of the line. >> >> Sim

Re: bash 4: source does not search current dir

2009-07-20 Thread Denys Vlasenko
On Mon, Jul 20, 2009 at 3:20 AM, Chet Ramey wrote: > Denys Vlasenko wrote: >> I assume . command does not search current directory anymore >> in bash 4 for a reason. Perhaps it is specified by relevant >> standard, although I did not find it. >> >> This incompatible change affects me a lot. I imagi

Re: echo "-e" produces no outputs

2009-07-20 Thread Stephane CHAZELAS
2009-07-19 21:07:20 -0400, Chet Ramey: [...] > > Note that it's a known non POSIX-conformance of bash. > > > > POSIX is explicit that > > > > echo -e > > > > Should output "-e\n". > > That's why bash has the `xpg_echo' option. You can build bash in such > a way that it's always enabled. [...]