Douglas Moyes a écrit :
> I nearly brought down a server today.
>
> # alias d="perl-script "
>
A long time ago I read somewhere that aliases are not recommended. I
think they do not bring anything on the table compared to functions, do
they?
Anyway I have always done without them, but witho
Eric Blake a écrit :
>
> This is E4 in the FAQ:
> ftp://ftp.cwru.edu/pub/bash/FAQ
>
> POSIX permits, but does not require, that the final element of a pipeline
> be executed in a subshell. Bash uses the subshell, ksh does not.
> Variable assignments in a subshell do not affect the parent.
I am
On 30 Nov 2009, at 11:34, Marc Herbert wrote:
> Eric Blake a écrit :
>>
>> This is E4 in the FAQ:
>> ftp://ftp.cwru.edu/pub/bash/FAQ
>>
>> POSIX permits, but does not require, that the final element of a pipeline
>> be executed in a subshell. Bash uses the subshell, ksh does not.
>> Variable as
I apologize for asking what is probably a dumb question, but where can
I find a definitive listing of what features are available in each
version of Bash.
For example, I only have access to Bash-4 on my system. I need to know
if " $(< " also works on Bash < 4. I also have a few questions
regardin
On 30 Nov 2009, at 12:12, Gerard wrote:
>
> I apologize for asking what is probably a dumb question, but where can
> I find a definitive listing of what features are available in each
> version of Bash.
>
> For example, I only have access to Bash-4 on my system. I need to know
> if " $(< " also
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Marc Herbert on 11/30/2009 3:18 AM:
> A long time ago I read somewhere that aliases are not recommended. I
> think they do not bring anything on the table compared to functions, do
> they?
There is one thing that aliases can do that funct
On Mon, Nov 30, 2009 at 11:46:03AM +0100, Lhunath (Maarten B.) wrote:
> Don't use pipelines to send streams to read. Use file redirection instead:
>
> Instead of ''command | read var''
> Use ''read var < <(command)''
>
> I hardly see a need to change the existing implementation.
Or for the orig
Lhunath (Maarten B.) a écrit :
> On 30 Nov 2009, at 11:34, Marc Herbert wrote:
>
>> Eric Blake a écrit :
>>> This is E4 in the FAQ:
>>> ftp://ftp.cwru.edu/pub/bash/FAQ
> Instead of ''commands | read var''
> Use ''read var < <(commands)''
> I hardly see a need to change the existing implementation
On 30 Nov 2009, at 14:10, Marc Herbert wrote:
>
> Lhunath (Maarten B.) a écrit :
>> On 30 Nov 2009, at 11:34, Marc Herbert wrote:
>>
>>> Eric Blake a écrit :
This is E4 in the FAQ:
ftp://ftp.cwru.edu/pub/bash/FAQ
>
>> Instead of ''commands | read var''
>> Use ''read var < <(commands)''
On Sat, Nov 28, 2009 at 02:57:45PM +0100, Antonio Macchi wrote:
> but, if you don't have hd (hexdump) how can you see the content of a,
> for example, strange file
>
> i mean
>
> $ ls -l
> total 0
> -rw-r--r-- 1 user1 user1 0 2009-11-28 14:56 ?
>
> $ hd <(ls)
> 09 0a
On Sat, Nov 28, 2009 at 02:18:37PM +0100, Antonio Macchi wrote:
> $ hd <(echo -en \\0{0..3}{0..7}{0..7})
As for this, I wonder if you understand how bash handles this.
I know it certainly wasn't obvious to me! Due to the way the parsing
is done, the brace expansions inside the proces substitution
On Mon, 30 Nov 2009, Marc Herbert wrote:
> Lhunath (Maarten B.) a ?crit :
> > On 30 Nov 2009, at 11:34, Marc Herbert wrote:
> >
> >> Eric Blake a ?crit :
> >>> This is E4 in the FAQ:
> >>> ftp://ftp.cwru.edu/pub/bash/FAQ
>
> > Instead of ''commands | read var''
> > Use ''read var < <(commands)''
On Mon, 30 Nov 2009, Greg Wooledge wrote:
> On Mon, Nov 30, 2009 at 11:46:03AM +0100, Lhunath (Maarten B.) wrote:
> > Don't use pipelines to send streams to read. Use file redirection instead:
> >
> > Instead of ''command | read var''
> > Use ''read var < <(command)''
> >
> > I hardly see a nee
On 30 Nov 2009, at 15:56, Chris F.A. Johnson wrote:
>
> On Mon, 30 Nov 2009, Greg Wooledge wrote:
>
>> On Mon, Nov 30, 2009 at 11:46:03AM +0100, Lhunath (Maarten B.) wrote:
>>> Don't use pipelines to send streams to read. Use file redirection instead:
>>>
>>> Instead of ''command | read var''
>
On Mon, 30 Nov 2009, Lhunath (Maarten B.) wrote:
> On 30 Nov 2009, at 15:56, Chris F.A. Johnson wrote:
> >
> > On Mon, 30 Nov 2009, Greg Wooledge wrote:
> >
> >> On Mon, Nov 30, 2009 at 11:46:03AM +0100, Lhunath (Maarten B.) wrote:
> >>> Don't use pipelines to send streams to read. Use file red
"Chris F.A. Johnson" writes:
>This works with the output of commands, too:
>
> IFS=- read year month day <<.
> $(date +%Y-%m-%d)
> .
The disadvantage is that the command is executed synchronously.
Andreas.
--
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B
Lhunath (Maarten B.) wrote:
> Note that 'read' is a bash feature; not a POSIX shell feature. In that
> sense, "read" alone is limiting your "portability". So portability in the
> meaning of POSIX is out of the question.
Pardon me? `read' is a feature of every historical shell and standardize
On 30 Nov 2009, at 16:15, Chet Ramey wrote:
>
> Lhunath (Maarten B.) wrote:
>
>> Note that 'read' is a bash feature; not a POSIX shell feature. In that
>> sense, "read" alone is limiting your "portability". So portability in the
>> meaning of POSIX is out of the question.
>
> Pardon me? `re
On Monday 30 November 2009 06:12:35 Gerard wrote:
> I need to know if " $(< " also works on Bash < 4.
it's been around for pretty much all time. bash-2 had it for sure, and that
is ancient.
-mike
signature.asc
Description: This is a digitally signed message part.
Chris F.A. Johnson a écrit :
>Why should it be the last element of a pipeline that is executed in
>the current shell and not the first?
Because that's POSIX' choice?
Because the last element is the last one in the data stream. So it feels
more natural to get everything from the last ele
Marc Herbert wrote:
> Chris F.A. Johnson a écrit :
>>Why should it be the last element of a pipeline that is executed in
>>the current shell and not the first?
>
>
> Because that's POSIX' choice?
No, POSIX allow either behavior. In fact, it allows any behavior ranging
from running all
pk wrote:
>> Because that's POSIX' choice?
>
> No, POSIX allow either behavior. In fact, it allows any behavior ranging
> from running all parts in their own subshells, to running all parts in the
> current shell.
"...each command of a multi-command pipeline is in a subshell environment;
as a
On Mon, Nov 30, 2009 at 11:15:38AM -0500, Mike Frysinger wrote:
> On Monday 30 November 2009 06:12:35 Gerard wrote:
> > I need to know if " $(< " also works on Bash < 4.
>
> it's been around for pretty much all time. bash-2 had it for sure, and that
> is ancient.
It doesn't exist in bash 1.14.7
On Mon, Nov 30, 2009 at 04:21:33PM +, Marc Herbert wrote:
> Chris F.A. Johnson a écrit :
> >Why should it be the last element of a pipeline that is executed in
> >the current shell and not the first?
>
> Because that's POSIX' choice?
Because that's what Korn shell does. (But not pdks
On Monday 30 November 2009 12:12:17 Greg Wooledge wrote:
> On Mon, Nov 30, 2009 at 11:15:38AM -0500, Mike Frysinger wrote:
> > On Monday 30 November 2009 06:12:35 Gerard wrote:
> > > I need to know if " $(< " also works on Bash < 4.
> >
> > it's been around for pretty much all time. bash-2 had it
Based on your question, I'm guessing you're in bash 3.2 or earlier, where
$ echo $BASH_VERSION
3.2.39(1)-release
$ cat /etc/issue
Debian GNU/Linux 5.0 \n \l
your "hd <(echo -en \\0{0..3}{0..7}{0..7})" is expanded as if you had typed
"hd <(echo -en \\) <(echo -en \\0001) <(echo -en \\000
On Mon, Nov 30, 2009 at 12:35:32PM -0500, Mike Frysinger wrote:
> On Monday 30 November 2009 12:12:17 Greg Wooledge wrote:
> > On Mon, Nov 30, 2009 at 11:15:38AM -0500, Mike Frysinger wrote:
> > > On Monday 30 November 2009 06:12:35 Gerard wrote:
> > > > I need to know if " $(< " also works on Bash
Gerard wrote:
I apologize for asking what is probably a dumb question, but where can
I find a definitive listing of what features are available in each
version of Bash.
For example, I only have access to Bash-4 on my system. I need to know
if " $(< " also works on Bash < 4. I also have a few que
Lhunath (Maarten B.) schrieb:
> My bad. I was under the impression `read` was a Bourne shell-only
thing and not standardized under POSIX.
(not personal for you only, I see that very often)
It would be nice if people actually read POSIX before they talk about it.
Jan
(Didn't have the OP on the server to followup to. SRI)
> On 30 Nov 2009, at 12:12, Gerard wrote:
>>
>> I apologize for asking what is probably a dumb question, but where can
>> I find a definitive listing of what features are available in each
>> version of Bash.
>>
>> For example, I only have
30 matches
Mail list logo