2 ms·
I have a pattern of the opposite. At one point almost everything was in Python, even very simple things. I "discovered" awk, and found I could do a lot of thing
by bsg75 14y ago
I have a pattern of the opposite. At one point almost everything was in Python, even very simple things. I "discovered" awk, and found I could do a lot of things in a few piped commands.
Python is still my go-to for a tasks > 1 line of code, but it is still surprising what can be accomplished in just one line of bash.
- js2 14y agoTo be clear, I still write a ton of stuff in shell. I try to think ahead to whether what I want to do can be accomplished in shell + standard unix utilities more easily than in Python. I use Python if it's not easily possible in shell + unix utilities, or the script is likely to be more than a few hundred lines. Here's one I probably should've written in Python - https://gist.github.com/jaysoffian/f39fa2da8e7f340550f9 https://gist.github.com/jaysoffian/f39fa2da8e7f340550f9