<div dir="ltr">Yeah, I'm using basename to get just the script, but to strip the suffix you have to know it. That's the issue. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 5:59 PM, Pete Hardie <span dir="ltr"><<a href="mailto:pete.hardie@gmail.com" target="_blank">pete.hardie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Have you looked at basename and dirname?<br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Apr 6, 2016 at 5:52 PM, leam hall <span dir="ltr"><<a href="mailto:leamhall@gmail.com" target="_blank">leamhall@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div>I'm trying to do something simple, change the ending of a script to ".txt". So if it'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'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?<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Leam<br clear="all"><div><div><div><div><div><br>-- <br><div><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div></div>
</div></div></div></div></div></font></span></div>
<br></div></div>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div>Pete Hardie<br>--------<br>Better Living Through Bitmaps</div>
</font></span></div>
<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div><a href="http://leamhall.blogspot.com/" target="_blank">Mind on a Mission</a></div></div>
</div>