zsh-workers
 help / color / mirror / code / Atom feed
From: Dino Ruic <dr@ithe.rwth-aachen.de>
To: zsh-workers@zsh.org
Subject: bug with sed and escaping?
Date: Wed, 10 Apr 2013 11:43:02 +0200	[thread overview]
Message-ID: <51653426.1000600@ithe.rwth-aachen.de> (raw)

Hello,

this is my first report, so I hope I can provide enough information. 
Also I'm somewhat of a beginner with zsh... Here's the thing:

As far as I've found out the zsh should not behave differently than the 
bash if I execute bash scripts. Here's a minimal example of what it does 
on my system.

Bash:
$ echo "xy" | sed -e s/^x//
y

The result is the string "y" as the sed command removes the initial x.

Zsh:
$ echo "xy" | sed -e s/^x//
zsh: no matches found: s/^x//

So this gives me an error. Zsh wants me to escape the caret (^) or I 
could wrap s/^x// in quotation marks. Either of those commands work

$ echo "xy" | sed -e "s/^x//"
$ echo "xy" | sed -e s/\^x//


If it were my script that I have to execute there, I'd change it to work 
properly. But this script is actually part of a large compiler package 
and it irks me that the zsh throws an exception while trying to execute 
some bash scripts in there. And I wouldn't want to "repair" scripts that 
actually should work.

Am I doing something wrong, here?

I tried this on multiple machines. Maybe I messed up some configuration, 
but I don't know where and why. If you need further information, please 
let me know.

Thanks in advance
Dino




             reply	other threads:[~2013-04-10  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  9:43 Dino Ruic [this message]
2013-04-10 10:00 ` Peter Stephenson
2013-04-10 11:06   ` Dino Ruic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51653426.1000600@ithe.rwth-aachen.de \
    --to=dr@ithe.rwth-aachen.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).