public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] hashtable lib and escaping
Date: Fri, 02 Nov 2012 23:20:10 +0100	[thread overview]
Message-ID: <20121102222010.190FA20063F@gemini.denx.de> (raw)
In-Reply-To: <ED3E0BCACD909541BA94A34C4A164D4C425D0244@post.tritech.se>

Dear Mats K?rrman,

please don't top post/full quote.  If needed, please read
http://www.netmeister.org/news/learn2quote.html

In message <ED3E0BCACD909541BA94A34C4A164D4C425D0244@post.tritech.se> you wrote:
>
> If not correct, then what is this supposed to mean (common/main.c :: builtin_run_command()):
> 
> 		/*
> 		 * Find separator, or string end
> 		 * Allow simple escape of ';' by writing "\;"
> 		 */

As I metioned, this is the _second_ part of escaping, that which
happens when processing the commands.  The first part happens when
reading the environment.

The examples I gave should show pretty well how it works:

> > See here:
> > 
> >         => setenv foo 'echo part one\;echo part two' ; print foo ; run > foo
> >         foo=echo part one;echo part two
> >         part one
> >         part two
> >         => setenv foo 'echo part one\\;echo part two' ; print foo ; run>  foo
> >         foo=echo part one\;echo part two
> >         part one;echo part two
> >         =>

Here is one more:

	=> setenv foo echo part one\\\;echo part two ; print foo ; run foo 
	foo=echo part one\;echo part two
	part one;echo part two
	=>

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Prediction is very difficult, especially of the future.  - Niels Bohr

  reply	other threads:[~2012-11-02 22:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 17:45 [U-Boot] hashtable lib and escaping Mats Kärrman
2012-11-01 20:00 ` Wolfgang Denk
2012-11-02  7:30   ` Mats Kärrman
2012-11-02 22:20     ` Wolfgang Denk [this message]
2012-11-05 13:34       ` Mats Kärrman
2012-11-05 18:33         ` Wolfgang Denk
2012-11-06  7:35           ` Mats Kärrman

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=20121102222010.190FA20063F@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox