3 ms·
This is definitely true... and a lot of people are doing it wrong. This is one of those things that drives me nuts as an experienced/old developer, seeing peop
by tacostakohashi 5y ago
This is definitely true... and a lot of people are doing it wrong.
This is one of those things that drives me nuts as an experienced/old developer, seeing people type passwords for ssh/git/whatever several times per day. Sometimes there are tasks that require copying / checking some file on N servers, and these people seem to think that cannot be done in a shell script because the password needs to be entered interactively.
Then there's ssh port forwarding, X11 forwarding, etc... but its amazing how many people use ssh for years without so much as glancing at the man page.
- Symbiote 5y agoIt is amazing how many people use any CLI tools for years without reading the man page. The man page for the shell (man bash; man zsh) is a good place to start.
- tacostakohashi 5y agoYes that too... "the kids of today" seem to regard basic shell tools and scripting as a dark art rather than an everyday part of using a computer and doing development productively. It's kind of sad.
- klabb3 5y agoI can't speak for others but personally I've never built up enough motivation to learn shell scripts (and related hackery like awk and sed) properly, even though I've learnt maybe 5-10 programming languages quite well and use the shell interactively all the time. I can't explain with certainty why, but I think it's due to lack of discoverability, inconsistent conventions for flags and positionals, esoteric syntax for simple control flow, lack of errors/feedback for things like undefined variables, no scoping/namespaces, unclear type system (not asking for much, strings, bools and ints would suffice). That said, piping/streaming is amazing and often better than in modern languages. In short, it's quite different from other imperative languages - the design feels arbitrary and the learnings non-transferable, even though I know it is useful and ubiquitous.
- jessaustin 5y agoIIRC, one could have said the same of "the kids of" twenty years ago. It still blows my mind that I didn't learn scripting at university. Could it have been because all the CS classes insisted on tcsh? My first job, I was using an internal tool and thought to myself "this could be better". My boss said "call this guy", and a brief phone call completely changed my understanding of Unix.
- toast0 5y ago> these people seem to think that cannot be done in a shell script because the password needs to be entered interactively. That's what autopw[1] is for. ;p [1] https://github.com/jschauma/sshscan/blob/master/src/autopw https://github.com/jschauma/sshscan/blob/master/src/autopw