<div dir="ltr"><div>Both. I'm going to write a script in X language, and put comments in that help document things. That script will be in a tools directory, or similar. I'll then run make_doc.sh tools/my_script.sh and it will pull all the comment into HOWTO/my_script.txt. The issue is the sed of sh, rb, pl, py, etc to txt.<br><br></div>Make sense? It will only run one script at a time. <br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 6:27 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">Is the issue that you don't want a separate command for each suffix, or that you will not know all the suffixes ahead of time?<br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 6:22 PM, Scott M. Jones <span dir="ltr"><<a href="mailto:eff@dragoncon.org" target="_blank">eff@dragoncon.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Great answers in Stack Overflow, including a bash-only solution.<br>
<br>
<a href="http://stackoverflow.com/questions/15060384/one-liner-in-bash-using-perl-or-awk-to-change-extension-of-multiple-files" rel="noreferrer" target="_blank">http://stackoverflow.com/questions/15060384/one-liner-in-bash-using-perl-or-awk-to-change-extension-of-multiple-files</a><br>
<span><br>
On 4/6/16 5:52 PM, leam hall wrote:<br>
> I'm trying to do something simple, change the ending of a script to<br>
> ".txt". So if it's my_script.sh it becomes my_script.txt. Likewise for<br>
> my_script.rb, etc. The .txt version will have the documentation and<br>
> comments.<br>
><br>
> So far all I've some up with is:<br>
><br>
> IS_SH=`echo ${SCRIPTNAME} | grep -c sh$`<br>
><br>
> For each expected script ending. Which seems a really ugly thing to do.<br>
> Is there a better way in Bourne shell to do this?<br>
><br>
> Leam<br>
<br>
</span><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>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class="">-- <br><div>Pete Hardie<br>--------<br>Better Living Through Bitmaps</div>
</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>