site  contact  subhomenews

align perl utility updated

August 26, 2021 — BarryK

For the previous post, I had a list of 807 packages and wanted to process them into neat columns. EasyOS has the 'column' utility, but I couldn't make it do what I want, so wrote a little script to convert the package names into a html table. For the record this is it:

echo '<html>
<table>' > pkg-list-table
for W in `cat pkg-list`
case "$W" in
packagegroup*) continue ;;
[ $CNT -eq 0 ] && echo '<tr>' >> pkg-list-table
echo " <td>${W}</td>" >> pkg-list-table
[ $CNT -lt 10 ] && continue
echo '</tr>' >> pkg-list-table
echo '</table>
</html>' >> pkg-list-table

...pretty simple.

Before implementing the html table solution, I tried to use 'align'. This is a perl script, also in EasyOS, however, found that it doesn't work, the script '' is required. However, that script is no longer in perl.

align is created by Steve Kinzler, and I looked at the project page:

Ah ha, there is a later version! I have 1.7.1, and 1.7.5 is available. Although it is possible to obtain that old '', version 1.7.5 doesn't require it, and it works in EasyOS -- at least, the "--help" works!

I have made it into a PET, which will be uploaded here soon:

I haven't actually used it, as already have implemented the html table. align has been in EasyOS and in puppies before that, and no one ever complained to me about it, so perhaps no one has used it. Most likely, because no one knew it was there.   

Tags: easy