3 ms·
I've never done any serious programming with bash, just simple Bourne shell scripts, because I don't want to think about all the escaping rules and such. I did
by abecedarius 10y ago
I've never done any serious programming with bash, just simple Bourne shell scripts, because I don't want to think about all the escaping rules and such. I did write some programs in Awk in the 90s (notably https://github.com/darius/awklisp https://github.com/darius/awklisp), so I'd go with that. Maybe someone who's bent bash to their will could speak up here?
AFAIK they're both ubiquitous, though you might need a particular awk like gawk for library functions, depending on what you need to do. Nowadays I'm way more likely to use Python, though of course it's a much bigger dependency.
Sorry about the injury, and good luck -- I'd like to hear how it goes.
- anonymous_fun 10y agoThe escaping in Bash can be a pain. I was recently writing an execution wrapper in Bash, and needed to send the results via JSON. Fighting with the quotes was almost enough to make me throw in the towel and move to a language with a builtin JSON parser, but I ran across this technique, of embedding a heredoc to preserve quotes in a variable. https://gist.github.com/kdabir/9c086970e0b1a53c3df491b20fcb0839 https://gist.github.com/kdabir/9c086970e0b1a53c3df491b20fcb0... It 'simplified' things and kept them readable. Thanks for sharing awklisp. Nice reading for a Sunday morning.
- abecedarius 10y agoI'm glad you enjoyed that, thanks. :)