Re: History file clobbered by multiple simultaneous exits

2013-07-17 Thread Geoff Kuenning
> ge...@cs.hmc.edu wrote: >> Locking should be used when truncating and writing the history >> file. (Yes, I know it's a pain in a portable program like >> bash.) >> >> Strictly speaking, locking is only half a solution, because >> the net result will be that the saved his

Re: script with ssh and filenames with spaces

2013-07-17 Thread Greg Wooledge
On Wed, Jul 17, 2013 at 08:42:17PM +, gscant...@comcast.net wrote: > I wish to ssh this command to several hosts: > ls -alst "dir_with_spaces" for host in "${hosts[@]}"; do ssh "$host" bash <<-'EOF' ls -alst "your directory" EOF done The - in front of the here document's d

script with ssh and filenames with spaces

2013-07-17 Thread gscantlen
plz help with this script, I wish to ssh this command to several hosts: ls -alst "dir_with_spaces" This script is close but I need DOUBLE-quotes around the remote command s #! /bin/bash PARAMS_FOR_LS=(-alst "dir with spaces") # get directory of local system ls "${PARAMS_FOR_LS[@]}" # g

Re: Determining the type of environment entry from Perl

2013-07-17 Thread Linda Walsh
Ole Tange wrote: GNU Parallel can today successfully transfer bash environment values through ssh to the remote host: FOO=xyz export FOO parallel --env FOO -S server 'echo $FOO' ::: bar That's likely because it has been trained to encode variables in a way that the other sid

Re: cd completion using aliased cd command

2013-07-17 Thread Chet Ramey
On 7/17/13 11:16 AM, Mark W. Johnson wrote: > Chet, > > I'm not familiar with the complete function.I did execute complete -pr > and found the following line: > > complete -o nospace -F _cd cd > > I never looked into what the rule does (perhaps this is something that gets > setup by

RE: cd completion using aliased cd command

2013-07-17 Thread Mark W. Johnson
Chet, I'm not familiar with the complete function.I did execute complete -pr and found the following line: complete -o nospace -F _cd cd I never looked into what the rule does (perhaps this is something that gets setup by Cygwin and not a bash default?), but I did conjecture that I

Re: cd completion using aliased cd command

2013-07-17 Thread Chet Ramey
On 7/17/13 10:53 AM, Mark W. Johnson wrote: > Linda, > > Don't get hung up on: > > function _cd { command cd "$@"; } > alias cd=_cd > > In my real _cd function it saves off the directories visited, but I didn't > want to complicate the issue, so I replaced my useful _cd function to

Re: cd completion using aliased cd command

2013-07-17 Thread Greg Wooledge
On Wed, Jul 17, 2013 at 02:53:41PM +, Mark W. Johnson wrote: > function _cd { command cd "$@"; } > alias cd=_cd > > In my real _cd function it saves off the directories visited, but I didn't > want to complicate the issue, so I replaced my useful _cd function to > something useless

RE: cd completion using aliased cd command

2013-07-17 Thread Mark W. Johnson
Linda, Don't get hung up on: function _cd { command cd "$@"; } alias cd=_cd In my real _cd function it saves off the directories visited, but I didn't want to complicate the issue, so I replaced my useful _cd function to something useless but simpler to demonstrate the problem.

Re: cd completion using aliased cd command

2013-07-17 Thread Chet Ramey
On 7/16/13 5:04 PM, Mark W. Johnson wrote: > From: mwjohnso > To: bug-bash@gnu.org > Subject: cd completion using aliased cd command > > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: cygwin > Compiler: gcc-4 > Compilation CFLAGS: -DPROGRAM='bash.exe' -D

Determining the type of environment entry from Perl

2013-07-17 Thread Ole Tange
GNU Parallel can today successfully transfer bash environment values through ssh to the remote host: FOO=xyz export FOO parallel --env FOO -S server 'echo $FOO' ::: bar But I would like to be able to transfer functions, too. Right now they work locally: myfunc() { echo This is a fu