@TicklishHoneyBee

oh the last I wrote I had and in it to work, and it was a internet usage meter to work in .

#conky #gawk #curl #script #bash

Last updated 1 year ago

Mark Gardner ‍:sdf: · @mjgardner
587 followers · 3108 posts · Server social.sdf.org

@xan It would be a nice compliment to gawk-select gawkextlib.sourceforge.net/sel

#gawk #gnu #awk

Last updated 2 years ago

Mark Gardner ‍:sdf: · @mjgardner
546 followers · 2804 posts · Server social.sdf.org

@cstross @thc It doesn’t get very far because multidimensional arrays (pretty important for this kind of thing) are a -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 v5.22 onward in 2015: perldoc.perl.org/perl5220delta

But you can get it from : metacpan.org/dist/App-a2p

#gawk #perl #cpan

Last updated 2 years ago

Linux Magazine · @linuxmagazine
4312 followers · 119 posts · Server fosstodon.org
R1L · @erwan35
66 followers · 388 posts · Server framapiaf.org

Awkaster is a -3D written completely in using technique github.com/TheMozg/awk-raycast

#raycasting #gawk #shooter #pseudo

Last updated 2 years ago

SalarRahmanian :scala: :nixos: · @softinio
310 followers · 676 posts · Server fosstodon.org

Yes it’s true! Someone has written a game using to them github.com/TheMozg/awk-raycast 😎🎉👏

#awk #gawk #kudos

Last updated 2 years ago

Andrey G-w 🌀 · @andger
5 followers · 14 posts · Server lor.sh

@fgntfg Great solution, just a small edit /./ to "." (n=split($1, date, ".")

#gawk #awk #bash #linux

Last updated 2 years ago

Andrey G-w 🌀 · @andger
5 followers · 14 posts · Server lor.sh

Exercises in learning
I have a file with the following content

$ cat file.txt
Agent Smith
555-666
31.03.1999

How to use to translate it to the form?

$ cat file.text
Agent Smith
555-666
1999-03-31

#gawk #bash #awk

Last updated 2 years ago

djohngo · @djohngo
240 followers · 2216 posts · Server mastodon.social

Just finished a simple 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.

#gawk

Last updated 2 years ago

djohngo · @djohngo
324 followers · 3564 posts · Server mastodon.social

Just finished a simple 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.

#gawk

Last updated 2 years ago

Free Software Foundation · @fsf
24879 followers · 4232 posts · Server hostux.social

November GNU Spotlight with Amin Bandali: Fifteen new releases in the last month, including , , , , and (as of November 28, 2022): u.fsf.org/3vf Big thanks to @bandali0 @bandali, all the devs, and other contributors!

#gnu #bash #gawk #octave #nano #taler

Last updated 2 years ago

Linux Magazine · @linuxmagazine
2922 followers · 68 posts · Server fosstodon.org
smxi · @smxi
14 followers · 123 posts · Server fosstodon.org

@RL_Dane @mjgardner @benjaminhollon @sotolf Without exaggerating, + 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.

#bash #gawk #inxi

Last updated 2 years ago

smxi · @smxi
14 followers · 123 posts · Server fosstodon.org

@RL_Dane @mjgardner @benjaminhollon @sotolf was a monstrosity of and - all because I needed a stable always works tool, and was in flux and was supposed to go away and become 6, not compatible, so I could not use , 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 inxi that were translated from bash/gawk because of how terrible their logic is.

#inxi #bash #gawk #perl

Last updated 2 years ago

Doc Edward Morbius ⭕​ · @dredmorbius
2083 followers · 14674 posts · Server toot.cat

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.

@tek

#awk #gawk #datavis #scripting

Last updated 2 years ago

erAck · @erAck
218 followers · 5335 posts · Server social.tchncs.de

that's , 5.2.0 comes without / support.
lwn.net/Articles/907278/

#vms #vax #gawk #awkward #awww

Last updated 2 years ago

(RTP):tor:Privacy & Tech Tips · @RTP
2615 followers · 3880 posts · Server fosstodon.org
Doc Edward Morbius ⭕​ · @dredmorbius
2081 followers · 14668 posts · Server toot.cat

The more traditional approach is with if/then statements.

I need to check again, but I think if/then actually turns out to run faster. I like the comact form of the example above though.

#gawk #awk #fizzbuzz

Last updated 3 years ago

Doc Edward Morbius ⭕​ · @dredmorbius
2081 followers · 14668 posts · Server toot.cat

FizzBuzz in gawk, using only printf() and C conditional expressions:

#!/bin/gawk -f

BEGIN {
for (i=1;i<=100;i++) {
printf(" %2s", i%(3*5)!=0 ? i%3!=0 ? i%5!=0 ? i : "buzz" : "fizz" : "fizzbuzz\n" )
}
printf("\n")
}

#fizzbuzz #awk #gawk

Last updated 3 years ago

Denis Salem · @denissalem
95 followers · 727 posts · Server mamot.fr

Well I just find out that is actually an alias for on most modern

#awk #gawk #linux #distros

Last updated 4 years ago