Follow

What if I wrote a dependency resolver in a horrible combination of bash and awk

· · Mastodon for iOS · 3 · 0 · 4

@aurynn I never finished (though this is probably the right thing to do). There was one sneaky `tr` in there that I never got around to removing:

github.com/TheSkorm/purebashjs

It's all sorts of bad.

@xssfox @aurynn
I think perhaps:
string_value_clean=${string_value//[[:space:]]}

@mattcen @aurynn I'm not sure you should be supporting me on this :P

@aurynn @xssfox What Aurynn said. :)

Seriously though I like well-written Bash and the purity of not needing to call separate programs (even though I admit it's hard to protect against weird edge cases, e.g. whitespace stuff. doubly-so if you want your code to be readable), and it would be such a shame to not be able to remove that one measly external call!

And it gave me a brief fun exercise to work out how whether Bash pattern substitution appropriately supported character classes. :)

@aurynn as curator of several ldap-modifying shell scripts, awk is seriously great

@aurynn

I have a Lisp written in bash lying around here somewhere. You could use that.

Selfie, eye contact, a look of horror 

@suetanvil gosh

Thats

Impressive

Selfie, eye contact, a look of horror 

@suetanvil I am truly impressed by this

Selfie, eye contact, a look of horror 

@aurynn

Oh, it's not *my* project. I just found it sometime back.

(And then forgot about it. And then found the file in scratch directory. )

Selfie, eye contact, a look of horror 

@suetanvil ohhh right heh

this is impressive, if cursed

Selfie, eye contact, a look of horror 

@aurynn

(*My* lisps were written in Perl and C++.)

Sign in to participate in the conversation
Cloud Island

A paid, early access, strongly moderated Mastodon instance hosted entirely in New Zealand.