[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Shell-parsing test program (was Re: coreutils-5.1.3 released: bug-fix-on
From: |
Eric Siegerman |
Subject: |
Shell-parsing test program (was Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0) |
Date: |
Wed, 11 Feb 2004 13:21:05 -0500 |
User-agent: |
Mutt/1.2.5i |
On Wed, Feb 11, 2004 at 11:48:09AM +0100, Jim Meyering wrote:
> $ echo / // /// //// .// //.
> $ echo abc| tr -t ab //
Here's a trivial little debugging aid I can't live without, for
testing and isolating just such things without driving oneself
crazy, or resorting to painful contortions like that "tr"
pipeline. Unlike echo:
- because it's not a shell builtin, you can be sure that
whatever effects you see are caused by the shell's generic
command-line parsing, rather than by any special-case code
for the particular command itself (well, you could get that
by saying "/bin/echo", but see below)
- it does *no* parsing or interpretation of the command-line
arguments; it just spits out what it sees -- benefit as above
- (irrelevent to your current problem) it shows you the
argument boundaries, so you can quickly see whether your
evals and variable substitutions expanded to:
prargs a b c
or:
prargs "a b c"
or:
prargs a "b " c
The blurb's twice the size of the program itself :-/
--
| | /\
|-_|/ > Eric Siegerman, Toronto, Ont. address@hidden
| | /
It must be said that they would have sounded better if the singer
wouldn't throw his fellow band members to the ground and toss the
drum kit around during songs.
- Patrick Lenneau
prargs.c
Description: Text document
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Jim Meyering, 2004/02/11
- Shell-parsing test program (was Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0),
Eric Siegerman <=
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Paul Eggert, 2004/02/11
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable5.2.0, Bruce Korb, 2004/02/11
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Lars Hecking, 2004/02/11
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Daniel Jacobowitz, 2004/02/12
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Paul Eggert, 2004/02/12
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Daniel Jacobowitz, 2004/02/12
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Paul Eggert, 2004/02/12
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Daniel Jacobowitz, 2004/02/16
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Paul Eggert, 2004/02/17
- Re: coreutils-5.1.3 released: bug-fix-only, candidate for stable 5.2.0, Jeff Sheinberg, 2004/02/14