5 ms·
10 years in tech and you haven’t optimised your shell?
by smcleod 3y ago
10 years in tech and you haven’t optimised your shell?
- Brajeshwar 3y ago20+ years in tech and these days, the first thing that comes to my mind is usually, “Can I walk out of this?” :-) The idea is to be able to use any computer/system/devices easily instead of one perfectly.
- smcleod 3y agoGosh, I couldn’t think of anything worse than having to optimise myself for generalist systems
- kjellsbells 3y agoMight be a generational thing. Some folks grew up on systems that could fail at any time and leave them with nothing but the tools in /sbin to fix it with. No /usr, no bash/zsh, just sh and vi if you were lucky. You learn to love the cool new things, but you still have a mental bag packed with fsck and ed in case you need to bug out. It's silly, really because no systems are like that any more, but the things you learned at 2am when you were 22 tend to stick with you.
- smcleod 3y agoPerhaps, I’ve been in tech 18+ years though. Cut my teeth on Solaris, AIX, Unix, Linux etc… the good old days!
- markstos 3y agoI strive to speak multiple languages, but I think it still worthwhile to be really good at my primary language of English. Same with computers and servers. I interact with a lot of them, but my primary computer that I use >80% of the time is worthwhile to optimize with some tooling that's not available on all the others.
- pjmlp 3y agoCoding since 1986 and I touch the shell as much as I have to, If I cared that much I would still be using MS-DOS, and UNIX without X.
- Symbiote 3y agoWhen you need to rename 5000 files from abcd_small.jpg to abcd.jpg, how do you do that? rename s/_small// *_small.jpg When you have the string ABCD_XYZ in 50 files but you need to change it to DEFG_UVW, how do you do that? perl -pi -e 's{ABCD_XYZ}{DEFG_UVW}' **/*(.) When you need to move all the files ending '.png' into the directory 'PNG', and all the ones ending '.jpg' into 'JPG', how do you do that? mkdir JPG PNG; for i in *.png *.jpg; mv $i $i:e:u
- pjmlp 3y agoThere are GUI tools that do that, and thankfully most scripting languages have a REPL.
- Symbiote 3y agoI'll bet it takes longer to find and use a GUI tool for these. And a shell is a REPL.
- pjmlp 3y agoYou bet wrong, because naturally approaching 50y, I have my tools for quite some time, for the stuff I care about, not random examples on the Internet. A UNIX shell is a very bad approximation of a real programming language REPL. It is no accident that sh scripts turn into Perl, Python, Tcl, Lisp,... when one wants to keep sanity.
- JNRowe 3y agoAs we're in a zsh story, I'll point out it comes with a clever file renaming interface out of the box¹. It allows full access to all the advanced glob operators zsh provides too². ¹ https://zsh.sourceforge.io/Doc/Release/User-Contributions.html#index-zmv https://zsh.sourceforge.io/Doc/Release/User-Contributions.ht... ² https://zsh.sourceforge.io/Doc/Release/Expansion.html#Filename-Generation https://zsh.sourceforge.io/Doc/Release/Expansion.html#Filena...
- cnity 3y agoX years in tech and you haven't Y. Pick any X and Y that maximises your ability to feel superior, I suppose.