Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: convolutions
- X-seq: zsh-users 20924
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: convolutions
- Date: Sat, 7 Nov 2015 09:33:53 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=X+80OH45NiCxXC9AAWPiAup63VSo1KrXGxn/8mTiw54=; b=EmfH0f5ybPJpEjioboJAazIP7j4rtCgb7qo6kjxwWoL9mcys0IOjEio6pBIVjBdWQm 11H5D/miwJtIQxbegwvpQ+tbtYb1Yr1xsBSDmj9ys7SQ72yo6/TVJMPh7gOVK1EF1n8L rjOHUDkxYeEDPMb5mLffnMe1csEOvZ7de7kOkT6kJRl6Lv2T83Jmgddk+3Vxyr7WQrw+ RDGZ1A4aPtjmAJM0zdvQP4IRwFycvlJr66o3Sf61qQh5laZKM4bxCC588BCI7hQc4n8n wSaf5HkS4IgbKmOaOhn51FGWzsn4oTsBpptEeSNRQJjY26s7iboSETRp4EIP35OEb8Lj bZ5w==
- In-reply-to: <563E222C.7040508@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <563D5ED5.1070102@eastlink.ca> <CAH+w=7bzDJV5bLSr3=bVkAoOm-Yov3DU9w58eqr6daJFCNvw-w@mail.gmail.com> <563D9B54.9010604@eastlink.ca> <151107013244.ZM23334@torch.brasslantern.com> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author