"help" translates arguments of builtin commands but not command description

2018-06-21 Thread Ralf Goertz
Hi, I think it is confusing to have the arguments of a builtin command translated by "help command" but in the subsequent explanation these arguments ar in english. Assuming you have german locale files for bash installed you will for example get the following: LANG=de_DE help test test: test [Au

Re: Only one Friday 13th coming in 2016

2015-12-22 Thread Ralf Goertz
Am Tue, 22 Dec 2015 08:16:28 -0500 schrieb Greg Wooledge : > On Tue, Dec 22, 2015 at 04:04:16AM +0100, Ángel González wrote: > > Aren't you making things more complex than needed, with so much > > pipes and awk? > > > > date(1) is your friend: > > > > For instance: > >  $ for y in {1900..2199} ;

Re: Not so useless use of cat

2014-09-17 Thread Ralf Goertz
Am Tue, 16 Sep 2014 14:44:05 -0500 schrieb Dennis Williamson : > Does your program support using a hyphen to represent stdout (some > do)? > > program -i "$i" -o - > It indeed does! Thanks for the tip. Ralf

Re: Not so useless use of cat

2014-09-16 Thread Ralf Goertz
Am Sat, 13 Sep 2014 12:53:48 -0600 schrieb Bob Proulx : > Dennis Williamson wrote: > > Bob Proulx wrote: > > > { for i in file[12] ; do cat "$i" ; done ;} > both > > There's no need for the curly braces and the last semicolon. > > Of course you are totally right. I was distracted by the subs

Not so useless use of cat

2014-09-12 Thread Ralf Goertz
Hi, Why do I need cat (the second on) here? $ echo first >file1 $ echo second >file2 $ (for i in file[12] ; do cat "$i" > /dev/stdout ; done) | cat > both $ cat both first second If I omit the "| cat" after the loop I get $ cat both second Even when using ">> both" instead of "> both"

Re: Command name dequote does not work

2014-04-15 Thread Ralf Goertz
Chet Ramey wrote: > On 4/15/14, 3:32 AM, ingo.kra...@eoa.de wrote: > >> Bash Version: 4.2 >> Patch Level: 37 >> Release Status: release >> >> Description: >> I wrote a simple shell script using sed to convert \n into newlines and >> other \\(.) to \\\1 and >> called that script dequote. When I'

Re: echo '-e' doesn't work as expected, or does it?

2012-01-23 Thread Ralf Goertz
Philip wrote: > Hi! Short question this time.. > > $ echo '-e' > does not print -e > > $ echo '-e ' > does print -e . By the way, neither -e nor -E are explained in the option section of „help echo“. Only -n is mentioned there. GNU bash, Version 4.2.10(1)-release (x86_64-suse-linux-gnu)

Re: BUG? RFE? printf lacking unicode support in multiple areas

2011-05-20 Thread Ralf Goertz
Greg Wooledge wrote: > On Fri, May 20, 2011 at 12:31:31AM -0700, Linda Walsh wrote: >> 1) use of of the \u and \U escape sequences >> in the format string (16 and 32 bit Unicode values). > > This isn't even a sentence. What bash command did you execute, and > what did it do, and what

Re: leading 0 inconsistence?

2011-02-14 Thread Ralf Goertz
Greg Wooledge wrote: > On Sat, Feb 12, 2011 at 11:57:08AM +0100, Ralf Goertz wrote: >> > if [ $((i)) -lt 9 ] ; then echo ok; fi >> bash: 08: value too great for base (error token is "08") >> >> Why is 08 not tried to be interpreted as octal when *numeric

leading 0 inconsistence?

2011-02-12 Thread Ralf Goertz
Hi, I am wondering what the reasoning might be for this seeming inconsistence. > i=08 > if [ $i -lt 9 ] ; then echo ok; fi ok > if [ $((i)) -lt 9 ] ; then echo ok; fi bash: 08: value too great for base (error token is "08") Why is 08 not tried to be interpreted as octal when *numerically* compar

Re: syntax error when setting variable in front of "while"

2010-08-09 Thread Ralf Goertz
Dennis Williamson wrote: > while is a compound command. Only simple commands can have preceding > variable assignments. From man bash: Thanks. I just found out that I can get away with > while IFS=$'\t' read a b; do echo "$a" "$b"; done

syntax error when setting variable in front of "while"

2010-08-06 Thread Ralf Goertz
Bash Version: 4.0 Patch Level: 35 Release Status: release Description: I am used to setting variables in front of a command like in > LANG=C man mplayer However, I get a "bash: syntax error near unexpected token `do'" error when trying: > FOO=BAR while read a b; do echo $a $b; done Why? Th

Re: process substitution

2009-10-15 Thread Ralf Goertz
Marc Herbert wrote: >> On Mon, Oct 12, 2009 at 1:14 PM, Ralf Goertz >>> is it possible to have a process substitution with both input and >>> output redirection? So far I use the following work-around >>> >>>> cat parentprocess.sh: >>&

process substitution

2009-10-14 Thread Ralf Goertz
Hi, is it possible to have a process substitution with both input and output redirection? So far I use the following work-around > cat parentprocess.sh: #!/bin/bash mkfifo fifo 2>/dev/null exec 5> >(./subprocess.sh > fifo) exec 6< <(cat < fifo) echo input to subprocess 1>&5 echo done sending inpu

Re: mysqldump usage in bash

2009-08-28 Thread Ralf Goertz
Arenstar wrote: > > Hello everyone.. > > Im running into quite a large problem in my bash script, I cannot use > mysqldump in bash as i require. > > The following code is in my script, and if i run it direct in command > line or by PHP, it works :-O > Unfortunately not in my bash script:( > >

Re: Inconsistent output in terminal emulator

2009-08-25 Thread Ralf Goertz
Mike Stroyan wrote: > On Mon, Aug 24, 2009 at 09:44:36AM +0200, Ralf Goertz wrote: >> I hope you don't mind my jumping in with a question that is only >> remotely related. But since you guys seem to be experts on tty… >> >> I have an embedded device running a

Re: Inconsistent output in terminal emulator

2009-08-24 Thread Ralf Goertz
Bob Proulx wrote: > nico raffo wrote: >> I'm writing a simple terminal emulator (on linux using standard pty >> libraries) and have run across some behavior in bash that I cannot >> explain after several weeks of reading documentation. > > I am not sure of the exact cause of your trouble. But ha

Re: Bash & tcp-server-sockets

2009-01-18 Thread Ralf Goertz
Hilco Wijbenga wrote: > Hi all, > > I found "Suggestion and patch for tcp-server-sockets" by Ralf Goertz > on Fri, 8 Jun 2007 12:52:47 +0200 that does exactly what I was looking > for. I don't see any discussion of this patch and running the proposed > co

bash still dies when trying to write to a tcp socket that has been closed on the other end

2007-11-08 Thread Ralf Goertz
Since nobody seemed to have noticed and the bug still exists in > bash --version GNU bash, version 3.2.25(1)-release (i586-suse-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. I thought I file my report once more. Description: I am trying to patch bash to have it open server

Suggestion and patch for tcp-server-sockets

2007-06-08 Thread Ralf Goertz
Hi, the other day I asked for a reason why there are no server sockets for bash. Since I got no answer, I decided to do it myself. I included a patch against the unpatched 3.2 file lib/sh/netopen.c (I think that file has not been patched by any of the 17 official patches). I think it is not reason

bash dies when trying to write to a tcp socket that has been closed on the other end

2007-06-06 Thread Ralf Goertz
Configuration Information [Automatically generated, do not change]: Machine: i586 OS: linux-gnu Compiler: gcc -I/usr/src/packages/BUILD/bash-3.2 -L/usr/src/packages/BUILD/bash-3.2/../readline-5.2 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHT