4 ms·
Very true. I have difficulties in training new recruits with UNIX. For some reason, beginners have developed an aversion to UNIX/shell scripting. I myself have
by guruparan18 12y ago
Very true. I have difficulties in training new recruits with UNIX. For some reason, beginners have developed an aversion to UNIX/shell scripting. I myself have started more and more of Ruby/AWK/Python, but it is always SHELL that blows me off with the sort of impact it has on the daily work.
I ended up highly optimizing my work environment to replace long ssh connections with `conn prod` (will use my RSA key and connect). File tranfers with `go get prod filename` or `go send prod filename`. Another script that can remember directory paths (I have to go over lot of them every day, and typing long lengthy ones does not help).
To me, UNIX shell scripting is a lazy men's most effective tool, only if you know how to use that rightly.
Loved the post. And thanks much.
- codyb 12y agoI'm a relative newbie in the field, but I really love using terminal (I do all my C work for grad school in ViM), it's really essential at work, there's no faster way to do batch file processing a lot of times (especially with ffmpeg, awesome). I'm surprised people don't like terminal, I love using it. It makes me feel old school, sort of like one of those hackers in the movies. That's probably just a personal thing. I was familiar with most of the concepts but the links section made things click in that regard. Enjoyed the post as well.
- endur 12y agoIt just takes a while to be faster in the terminal than with the gui, and most people won't switch from the thing they're used to until they see significant advantages. I remember when I first started using the terminal, it was slow and confusing. You had to read the man pages for every little thing. Discovering the command you want is tough, I'd be screwed without the internet. Now I hate when I need to take my hands of the keyboard to use the mouse. What a waste of time!
- madsravn 12y agoWhen I was a student programmer, my boss came over to my desk to introduce my new project. He then fired up a terminal, ssh'd into the box where I would find the data. He then presented me the data by doing all kinds of bash magic. I was fairly impressed each time. I used some time just trying to make sense of what he did and how. It's insanely useful.
- zo1 12y agoIt's not just UNIX, hey. I come across a lot of programmers that have no idea how to browse the basic command line in windows. I.e. They have no concept of relative paths, browsing through folders, command parameters. It's all incomprehensible "mumbo jumbo" for them. Which is fine, not everyone has been exposed to it. Eventually, by the fifth time I have to tell them how to move one folder up (Cd ..), I realize that something is very, very wrong.
- endur 12y agoBash scripts are great if they're yours. My current project has ~20 large bash scripts that do all sorts of different things. They were all written by people who haven't worked on the project for two years. Anyone who needs to make changes there spends far too long trying to figure out what's going on. The scripts could have been written in the same language as the project, and it wouldn't take a whole day to make changes to them. I think they wrote in Bash to avoid the interpreter startup time. But the scripts are run very infrequently and most of them start/stop long-running services. That being said, getting a bash script to do the right thing is very satisfying!
- warfangle 12y agoBash scripts for very simple series of commands; higher level scripts for when those sets of commands need logic wrapped 'round 'em. For example: provisioning for packer|vagrant, if you don't need to go overkill with puppet|chef.
- halisaurus 12y agoIf you didn't know you can put ssh configurations (hosts, ports, keys, etc) in ~/.ssh/config. You can use it in scp like 'scp prod:path/to/file path/to/destination'. Not sure if there's a pro/con to mapping an alias.
- guruparan18 12y agoI decided not to use ~/.ssh/config because I wanted the program to be dynamic and record the sessions as I connect for the first time [https://raw.githubusercontent.com/guruparan18/conn/master/conn https://raw.githubusercontent.com/guruparan18/conn/master/co...]. Same case with `scp`, I have bunch of production servers and I have to send/get files from production server all the time. This means, I have to come up with my own one-line command [https://raw.githubusercontent.com/guruparan18/go/master/go https://raw.githubusercontent.com/guruparan18/go/master/go] As I said earlier, to me, UNIX scripting is highly personal. The scripting reflects one's personality. That is why there is not always the right one. There are several way of doing.