zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: convolutions
Date: Sat, 7 Nov 2015 09:33:53 -0800	[thread overview]
Message-ID: <151107093353.ZM24145@torch.brasslantern.com> (raw)
In-Reply-To: <563E222C.7040508@eastlink.ca>

On Nov 7,  8:09am, Ray Andrews wrote:
} Subject: Re: convolutions
}
} $ . ./test: test2
} 12345678-10-345678-20-345678-30-345678-40-345678-50-345678-60-345678-70-345678-80-345678-90-345678-100
} 
} [ in glorious color: ]
} 
} 10-345678-20-345678-30-345678-40-345678-50-345678-60-345678-70-345678-80-345678-90-345678-100

[...]

} working here, tho the first part of my 'measuring string' is cut off for 
} some reason.

    "\${$(cat junk1)}"

becomes

    ${12345678-...}

which is the syntax for "the 12345678th positional parameter, or if that
is not set, then ..." and your expansion "works" entirely by accident
but lops off the 12345678 from the front.

So your stress test isn't anywhere near as stressful as you thought.

} But I would like some way of performing 
} expansions inside a file without any gottchas.  Surely that's simple at 
} least to verbalize:
} 
}      $ cat in_file | expand_all_parameters > out_file

There's no shell operation for "expand parameters but not any of the
other kinds of expansions you know about."  If what you want is some
kind of text replacement, you should be writing in_file in a text
processing language (HTML maybe?) rather than in shell syntax.


  reply	other threads:[~2015-11-07 17:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07  2:15 convolutions Ray Andrews
2015-11-07  2:49 ` convolutions ZyX
2015-11-07  4:10   ` convolutions Ray Andrews
2015-11-07  5:37 ` convolutions Mikael Magnusson
2015-11-07  6:16   ` convolutions Ray Andrews
2015-11-07  6:38     ` convolutions Mikael Magnusson
2015-11-07 15:35       ` convolutions Ray Andrews
2015-11-07 17:26         ` convolutions ZyX
2015-11-07  5:38 ` convolutions Bart Schaefer
2015-11-07  6:33   ` convolutions Ray Andrews
2015-11-07  9:32     ` convolutions Bart Schaefer
2015-11-07  9:40       ` convolutions Bart Schaefer
2015-11-07 16:09       ` convolutions Ray Andrews
2015-11-07 17:33         ` Bart Schaefer [this message]
2015-11-07 18:28           ` convolutions Ray Andrews
2015-11-07 17:17   ` convolutions Martin Vaeth
2015-11-08 15:27     ` convolutions Ray Andrews
2015-11-08 19:14       ` convolutions Bart Schaefer
2015-11-08 21:06         ` convolutions Ray Andrews
2015-11-09  8:50       ` convolutions Martin Vaeth

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=151107093353.ZM24145@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).