@xan It would be a nice compliment to gawk-select https://gawkextlib.sourceforge.net/select/select.html
@cstross @thc It doesn’t get very far because multidimensional arrays (pretty important for this kind of thing) are a #gawk-ism:
% a2p awkaster.awk
syntax error in file awkaster.awk at line 23
Translation aborted due to syntax errors.
FYI a2p was removed along with find2perl and s2p from #Perl v5.22 onward in 2015: https://perldoc.perl.org/perl5220delta#find2perl,-s2p-and-a2p-removal
But you can get it from #CPAN: https://metacpan.org/dist/App-a2p
Did you miss Linux Update yesterday? Check out this week's feature and catch up on articles you may have missed https://mailchi.mp/linux-magazine.com/linux-update-open-source-social-media-tools #Linux #OpenSource #Diaspora #Friendica #Mastodon #NetrunnerOS #PikaOS #SOOCon23 #Zeit #Gawk #Shell #systemd #GeekBeacon #jobs #events
#linux #opensource #diaspora #friendica #mastodon #netrunneros #pikaos #soocon23 #zeit #gawk #shell #systemd #GeekBeacon #jobs #events
Awkaster is a #Pseudo-3D #shooter written completely in #gawk using #raycasting technique https://github.com/TheMozg/awk-raycaster
#raycasting #gawk #shooter #pseudo
Yes it’s true! Someone has written a game using #awk #gawk #kudos to them https://github.com/TheMozg/awk-raycaster 😎🎉👏
Just finished a simple #gawk script to diff the csv from debirdify with the csv of the accounts I'm following on Mastodon. I'm not even sure if this is necessary, but it was fun.
Just finished a simple #gawk script to diff the csv from debirdify with the csv of the accounts I'm following on Mastodon. I'm not even sure if this is necessary, but it was fun.
November GNU Spotlight with Amin Bandali: Fifteen new #GNU releases in the last month, including #Bash, #Gawk, #Octave, #Nano, and #Taler (as of November 28, 2022): https://u.fsf.org/3vf Big thanks to @bandali0 @bandali, all the devs, and other contributors!
#gnu #bash #gawk #octave #nano #taler
Did you miss this week's Linux Update newsletter? Read it now and subscribe to get it free every week! https://mailchi.mp/linux-magazine.com/linux-update-roll-your-own-download-manager?e=350e18dfc3 #Gawk #Linux #OpenSource #AlpineLinux #OrangePi #NAS #storage #PostmarketOS #jobs #events #RockyLinux
#gawk #linux #opensource #alpinelinux #orangepi #nas #storage #postmarketos #jobs #events #RockyLinux
@RL_Dane @mjgardner @benjaminhollon @sotolf Without exaggerating, #bash+#gawk #inxi was a true nightmare to work on, trying to do complex multidimensional data structures in gawk then feeding them to bash was insane. I used to have to psych up for few weeks to do anything in bash inxi at all. At 20k lines of bash/gawk, it was not maintainable, impossible to work on.
NEVER write long bash scripts, it's a mistake, with rare exceptions! I regret every bash project I've done, total waste.
@RL_Dane @mjgardner @benjaminhollon @sotolf #inxi was a monstrosity of #bash and #gawk - all because I needed a stable always works tool, and #perl was in flux and was supposed to go away and become 6, not compatible, so I could not use #perl, and could not see into the future to realize what would happen. bash+gawk gave and gives me nightmares, horrible, insane. I am still fixing bugs to this day in #perl inxi that were translated from bash/gawk because of how terrible their logic is.
And for those who like source code:
gawk -F '|' '
{
label[NR]=$1;
data[NR]=$2;
max=(max>$2?max:$2)
};
END{
print "max: " max;
scale=20/max;
print "scale: " scale;
for(i=1;i<=NR;i++) {
printf( "%10s ", label[i]);
for(j=0; j<= scale*data[i] ;j++) printf( "*" );
printf("\n")
}
}'
That's fairly generalisable into a generic bargraph generator. Usually I'd set the scale to something larger, print labels and data values, and auto-format those based on observed widths. I'd limited output width based on Mastodon not giving much by way of line-length.
#awk #gawk #datavis #scripting