From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12875 invoked by alias); 10 Apr 2013 11:06:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31252 Received: (qmail 11741 invoked from network); 10 Apr 2013 11:06:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at ithe.rwth-aachen.de does not designate permitted sender hosts) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed X-IronPort-AV: E=Sophos;i="4.87,445,1363129200"; d="scan'208";a="217604256" Message-id: <516547BF.2080807@ithe.rwth-aachen.de> Date: Wed, 10 Apr 2013 13:06:39 +0200 From: Dino Ruic User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 To: Peter Stephenson , zsh-workers@zsh.org Subject: Re: bug with sed and escaping? References: <51653426.1000600@ithe.rwth-aachen.de> <20130410110033.7ae32aba@pwslap01u.europe.root.pri> In-reply-to: <20130410110033.7ae32aba@pwslap01u.europe.root.pri> X-PMWin-Version: 3.1.1.0 Thanks for the quick reply. I think I didn't express myself well enough and I also did not understand my actual problem. Though, your reply pointed me in the right direction, the zsh is just fine. The Bash scripts that are executed have the shebang #!/bin/bash in them. That means they are executed using the Bash-interpreter. At least they should, but they weren't, that's what confused me. Here is the very simple solution to my problem: The Bash-script is contained in my old .bashrc which is handed to my .zshrc with the source-command. Therefore the shebang in the Bash-script is ignored and the script is interpreted by the zsh, yielding an error... changing "source /path/to/bashscript.sh" to "/bin/bash /path/to/bashscript.sh" seems to get it done. Sorry for the beginner's question. Thanks. Dino On 04/10/2013 12:00 PM, Peter Stephenson wrote: > On Wed, 10 Apr 2013 11:43:02 +0200 > Dino Ruic wrote: >> Zsh: >> $ echo "xy" | sed -e s/^x// >> zsh: no matches found: s/^x// > The "^" is doing a form of enhanced file name generation: what you've > typed means "match all files that start with 's/' and then continue with > anything that isn't 'x//'", which obviously isn't what you want. If > you're not using the additional pattern matching features of ^, ~, #, | > and parentheses as documented in the zshexpn manual page, you can > "unsetopt extendedglob". It's not on by default, so something in your > initialisation files is setting it. > > Generally, however, you really need to decide if you actually need raw > Bourne shell stuff to work --- in which case it's possible to get zsh to > emulate it more fully, but in that case you might be better off with a > shell that does it by default, depending what it is you're trying to do > --- or if all you want is to learn how zsh works and adapt to it. In > the latter case, quoting is the right way to go in this particular case. > > (I'd actually recommend single quotes --- it'll work in this case with > double quotes, but expressions involving '^' also have a meaning to > history expansion, so single quotes are a bit safer. This is probably > week 3 of the beginner's zsh class rather than week 1 :-).) > > pws