Re: Is this a design oversight? BASH redirection failure

2015-02-24 Thread Chet Ramey
On 2/24/15 1:32 PM, John McKown wrote: I run with set -o noclobber. I know to use | to redirect stdout and overwrite an existing file. But I often want to redirect both stdout and stderr to the same file. Which I do with the operator. But I cannot _easily_ redirect both and overwrite at the

Re: history EINTR bug

2015-02-24 Thread Chet Ramey
On 2/22/15 10:45 PM, gregrwm wrote: this just happened: bash: history: write error: Interrupted system call What command did you use? history|less The most likely possibility is that you quit out of less before `history' wrote enough data to cause stdio to flush its output buffer

Re: Bugs in ERR and RETURN traps

2015-02-24 Thread Chet Ramey
On 2/19/15 2:54 PM, Paul Donohue wrote: The RETURN trap does not see the exit status of 'return', but rather the exit status of the last command before 'return' was called. Example: $ test_fun() { trap 'echo returned $?' RETURN false # exit status is 1 return 2 } $ test_fun returned

Re: how to search for commands

2015-02-24 Thread Hans J Albertsson
Help in bash seems to do most of what's actually needed. Hans J. Albertsson From my Nexus 5 Den 24 feb 2015 11:48 skrev Hans J Albertsson hans.j.alberts...@gmail.com : Powershell is a very good cmd language, so bash and other unix shells might do well to adopt some ideas from there.

Re: how to search for commands

2015-02-24 Thread Hans J Albertsson
Powershell is a very good cmd language, so bash and other unix shells might do well to adopt some ideas from there. Normally, cmd search is only done thru completion in Unix shells, which was an idea from tops 20 exec on Digital Equipment mainframes and early lisp machines. Get-command does more

Re: how to search for commands

2015-02-24 Thread garegin16
hmm. but can I use a wildcard with any of them. For example search for all commands which contain the word nice. Which would bring up ionice.

Re: how to search for commands

2015-02-24 Thread Pierre Gaston
Thanks for your useful input. On Tue, Feb 24, 2015 at 12:54 PM, Hans J Albertsson hans.j.alberts...@gmail.com wrote: Help in bash seems to do most of what's actually needed. Hans J. Albertsson From my Nexus 5 Den 24 feb 2015 11:48 skrev Hans J Albertsson hans.j.alberts...@gmail.com:

Re: how to search for commands

2015-02-24 Thread Pierre Gaston
On Tue, Feb 24, 2015 at 7:11 AM, Dan Douglas orm...@gmail.com wrote: On Mon, Feb 23, 2015 at 10:50 PM, garegi...@gmail.com wrote: How do you search for commands? In powershell you have the get-command cmdlet. Is there anything equivalent in unix? Depends on the type of command. For shell

Re: how to search for commands

2015-02-24 Thread Pierre Gaston
On Tue, Feb 24, 2015 at 1:51 PM, garegi...@gmail.com wrote: hmm. but can I use a wildcard with any of them. For example search for all commands which contain the word nice. Which would bring up ionice. compgen -c | grep nice

Re: bash-4.3 and ulimit -T

2015-02-24 Thread Chet Ramey
On 2/23/15 8:05 PM, William Bader wrote: I am running bash 4.3.33 that I built from source on Fedora 20 3.18.7-100.fc20.x86_64. When I run help ulimit, the line for -Tthe maximum number of threads does not line up with the other options because the message in ulimit_doc[] around line

Is this a design oversight? BASH redirection failure

2015-02-24 Thread John McKown
I run with set -o noclobber. I know to use | to redirect stdout and overwrite an existing file. But I often want to redirect both stdout and stderr to the same file. Which I do with the operator. But I cannot _easily_ redirect both and overwrite at the same time. I was expecting | to work, but it

Fwd: Is this a design oversight? BASH redirection failure

2015-02-24 Thread John McKown
I run with set -o noclobber. I know to use | to redirect stdout and overwrite an existing file. But I often want to redirect both stdout and stderr to the same file. Which I do with the operator. But I cannot _easily_ redirect both and overwrite at the same time. I was expecting | to work, but it

Mulit-byte character in prompt/line wrapping issue.

2015-02-24 Thread Steve Terpe
This seems to be related to other issues involving multibyte chars in the command prompt but is slightly different: It seems that when the start of multibyte (2-byte) character falls on the last column of $COLUMNS, the line wrapping gets confused and overwrites the current line rather than

Re: Is this a design oversight? BASH redirection failure

2015-02-24 Thread John McKown
On Tue, Feb 24, 2015 at 2:10 PM, Chet Ramey chet.ra...@case.edu wrote: On 2/24/15 1:32 PM, John McKown wrote: I run with set -o noclobber. I know to use | to redirect stdout and overwrite an existing file. But I often want to redirect both stdout and stderr to the same file. Which I do

Re: Mulit-byte character in prompt/line wrapping issue.

2015-02-24 Thread Ryan Cunningham
This issue has nothing to do with Bash. It is likely an artifact of the Ubuntu terminal driver. Try e-mailing the Ubuntu developers or Canonical Ltd. for help. They may provide a solution. -- Sent from my iPod On Feb 24, 2015, at 2:15 PM, Steve Terpe srte...@gmail.com wrote: This seems