<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>I will start with last question. The reason CHSTRING command outputs ".chstr.cex" filenames is so that you can check the output to see if changes were done correctly and nothing went wrong. If you really want to take a chance then add +1 option to the command line. Otherwise, after you verify that only right string were replaced correctly you can use command "ren -f *.chstr.cex *.cha" to change all output filenames to .cha.</div><div class=""><br class=""></div><div class="">For the first question CHSTRING command works on word bases by default. This means that the string that you want to replace has to completely match the code in the data file. For example, if you have codes "$code-1want-to-change" and "$code-2want-to-change", then following commands will replace only code "$code-1want-to-change":</div><div class=""><br class=""></div><div class=""><div class="">chstring +t%dep +s"$code-1want-to-change" "$new-code"<br class="">chstring +t%dep +s"$code-1*" "$new-code*"</div><div class=""><br class=""></div><div class="">Please notice the "+t%dep" option. It will guarantee that only codes found on %dep tier will be replace. The same string on other tiers will not be changed.</div><div class=""><br class=""></div><div class="">If you want a more detailed example, then you can email your sample file to me directly along with a list of codes you want to replace and I will give you the exact command line(s).</div><div class=""><br class=""></div><div class=""><br class="">Leonid.
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Jan 23, 2022, at 15:06, remeig...@<a href="http://gmail.com" class="">gmail.com</a> <<a href="mailto:remeigonzalez@gmail.com" class="">remeigonzalez@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p class="">Dear all, </p><p class="">We are
trying to find a way <b class="">to replace several codes</b> we used in a dependent
tier in many files, in order to create new files with these new codes. </p><p class="">As far as I
know, the CHSTRING command with a <i class="">.cut </i>file containing a list of all the
replacements can be used for this purpose, but I’m afraid of going wrong and
replacing strings that we are not supposed to, specially in the case of complex
codes containing characters like : or – (although I believe they’re not
considered metacharacters in this case). </p><p class="">I would go
with something like: </p><p class="">CHSTRING %dep “$code-Iwant-to-change” “resulting-code”.</p><p class="">Is there
any other way to do it or is there any unique option I should use in the case
of using CHSTRING in dependent tiers? </p><p class="">Furthermore,
I noticed the next: when using CHSTRING command it gives me back as an output a
.chstr.cex file format. Is there any way to avoid this? </p><p class="">Thank you
in advance,</p><p class="">--</p><p class="">Remei González Manzanero </p><div class=""><br class="webkit-block-placeholder"></div>
-- <br class="">
You received this message because you are subscribed to the Google Groups "chibolts" group.<br class="">
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:chibolts+unsubscribe@googlegroups.com" class="">chibolts+unsubscribe@googlegroups.com</a>.<br class="">
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/chibolts/303df79e-aed9-4a00-899a-735f85d62ccfn%40googlegroups.com?utm_medium=email&utm_source=footer" class="">https://groups.google.com/d/msgid/chibolts/303df79e-aed9-4a00-899a-735f85d62ccfn%40googlegroups.com</a>.<br class="">
</div></blockquote></div><br class=""></div></body></html>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "chibolts" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:chibolts+unsubscribe@googlegroups.com">chibolts+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/chibolts/256FDD67-B182-4331-9DF2-48B7344AEE81%40andrew.cmu.edu?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/chibolts/256FDD67-B182-4331-9DF2-48B7344AEE81%40andrew.cmu.edu</a>.<br />