<div dir="ltr"><div><div><div>I&#39;m trying to do something simple, change the ending of a script to &quot;.txt&quot;. So if it&#39;s my_script.sh it becomes my_script.txt. Likewise for my_script.rb, etc. The .txt version will have the documentation and comments. <br><br></div>So far all I&#39;ve some up with is:<br><br>  IS_SH=`echo ${SCRIPTNAME} | grep -c sh$`<br><br></div>For each expected script ending. Which seems a really ugly thing to do. Is there a better way in Bourne shell to do this?<br><br></div>Leam<br clear="all"><div><div><div><div><div><br>-- <br><div class="gmail_signature"><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div></div>
</div></div></div></div></div></div>