FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 06-20-2010, 04:49 PM
Cedric Staniewski
 
Default makepkg: remove bash4 style output redirection

On 20.06.2010 18:15, Daenyth Blank wrote:
> On Sun, Jun 20, 2010 at 11:21, Allan McRae <allan@archlinux.org> wrote:
>> convert bash-4 "&>" style redirection to "2>&1" to maintain
>> compatibility with bash-3.2
>>
>> Signed-off-by: Allan McRae <allan@archlinux.org>
>> ---
>
> &> style redirection is supported by bash 3, as far as I know. Maybe
> even bash 2, but I don't have that on hand to test. Was this added in
> bash 3.3, or does 3.2 support it?

I don't have access to a bash3 anymore, but you're right. It's mentioned
in bash-3.2.48's man page. Maybe there was a bug that prevented it from
working correctly or [1] is just wrong.

> &>filename
> # Redirect both stdout and stderr to file "filename."
> # This operator is now functional, as of Bash 4, final release.


[1] http://tldp.org/LDP/abs/html/io-redirection.html
 
Old 06-21-2010, 01:38 AM
"Allan McRae"
 
Default makepkg: remove bash4 style output redirection

On 21/06/10 03:25, Andres P wrote:

On Sun, Jun 20, 2010 at 12:19 PM, Cedric Staniewski<cedric@gmx.ca> wrote:

I don't have access to a bash3 anymore, but you're right. It's mentioned
in bash-3.2.48's man page. Maybe there was a bug that prevented it from
working correctly or [1] is just wrong.


&>filename
# Redirect both stdout and stderr to file "filename."
# This operator is now functional, as of Bash 4, final release.



[1] http://tldp.org/LDP/abs/html/io-redirection.html



No, the bash 4 only construct is appending:
$ foo&>> bar

Redirs of the form&>, which a *single*>, are fully functional in bash 3.2



I have tested and it looks like this has always worked in bash. Testing
v3.0 on an old FC3 install showed no issues. I can only assume there
must be some bug in it for the comment in [1] to be made, but until we
strike it, I think there is no need to patch these out.


Allan
 

Thread Tools




All times are GMT. The time now is 04:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org