Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd have to throw most of the standard UNIX utils in there: grep, awk, cut, sed, sort, uniq, and of course, vim.

Outside of the tech world, people seem to think that grabbing some columns out of a file and rearranging them or pasting them somewhere else is some kind of sorcery.



One unix based utility that has saved me incredible amounts of time is 'vimv'.[1]

You run vimv and you get your pwd, in the editor, and you can edit it like a text file. Then just quit and save and all of your filename changes get committed to that directory.

It's an extremely fast way to do a bunch of random and irregular edits to a big directory full of files.

[1] https://github.com/ivanmaeder/vimv


This sounds similar to 'vidir', which is available in Debian/Ubuntu in the package 'moreutils'. Indeed very useful for editing large directories.


Interesting. It's packaged for macOS, too. Install Homebrew via https://brew.sh/ then type

$ brew install moreutils


Or wdired mode in GNU emacs


That's amazing. I think I've been looking for this tool for... many, many years. Thanks!


Dito for CentOS.

Wow, this is really cool! Wish I had known about this sooner!


I considered to write about these, but

1) some guru out there has probably done a blog post on how to automate things with all of these.

2) I wanted to write something that could help anyone, not only people who are well versed in tech.

But I agree, most of the renaming/sorting/parsing in general, can be done with unix commands.


"1) some guru out there has probably done a blog post on how to automate things with all of these."

… in 1982, before the word "blog" even existed - and the advice/instructions still work just fine on any modern vaguely posix/unix-like command shell, including Mac and Windows which also didn't exist when the piece was written.

(Gopher search in "Unix - Utilities - Tutorials - sed and awk - brian kernighan" or dial in to your WELL bbs number and ask for a copy of "sed-awk-tutorial.txt" in the Software conference...)


I'm just a lowly WordPress developer but I live in on the commandline ( iTerm and Emacs on osx ).

The dev lead at an agency I worked at used to tell me using such old tools was going to hold me back. I've found the opposite to be the case.

I'm by no means an expert but the even my basic skills allow me to do things that they couldn't with fewer key strokes.

They also didn't complain when I created some bash scripts to automate pushing development databases around.

Fun!!


That dev lead was fundamentally wrong and you did well. I dare say that as a Wordpress developer, knowing your Unix tools you have a significant advantage compared to the rest.


there is something incredibly beautiful about the command line, and being able to pipe stuff through those things at lightning speed, finding exactly what you want. its so pure, and so useful. and its fun to look at the source for those too. ive gotten alot of mileage out using the basics + jq (https://stedolan.github.io/jq/) to inspect data.


And in the tech world. I had a sweng government contractor making six figures ask me how to sort lines in a text file.


Three of my forty coworkers actually understand the command-line on a level nearly on par with me, and I'm not an expert (locally, yes; globally, hardly). It's been frustrating me since my first real job in industry and others in government. I think I got spoiled in college by being surrounded by (mostly) curious tinkerers who had no problem delving into the multitude of tools that were available and exploring them. Post-school, people seem to lose that curiosity, if they ever possessed it, as a group.


I've been in job situations where just picking up a handful of hotkeys for a program is seen as Deep Wizardry. Most people just never learn how to do things like that.


And this is why 10x programmers are a thing.


Maybe it's not losing curiosity, but changes in priorities.

IME: I had much more time available to spend learning tools like that. Now that I work, have a family, etc, I don't have as much time to spend.


Learning tools like that should be part of your work imho.


Sure, a part of it is. But I also have a lot of stuff that I have to get done at work as well, that I didn't have to get done at school.


It sounds like you took the wrong job. I was surrounded by curious tinkerers in school, and I'm very happy to say that at my first two jobs I have been surrounded by curious tinkerers.


Maybe you're just a better person than them.


Possibly, but doubtful. I suppose really it's the unwillingness to learn (by otherwise educated and intelligent people, so they have or at least had the capacity for learning at one point). This is just a glaring example in the programming field. We literally program computers to do whatever we want (modulo performance or physical limitations), why would our tools be any different?


>I'd have to throw most of the standard UNIX utils in there: grep, awk, cut, sed, sort, uniq, and of course, vim.

Agreed. I'd just add that there are many more tools along the same lines (just have to look in the various bin directories, and not to forget custom ones that people write in C / shell / other languages and combinations of the same), and that it is how they work together - because of a few powerful key concepts like pipes, I/O redirection, file wildcards, the various metacharacters starting with $ and others - that really makes the system powerful, more than any individual tool, though those play a part too.


And for images, there is netpbm: http://netpbm.sourceforge.net/


Or ImageMagick. On macOS, install Homebrew via http://brew.sh/ and then type

$ brew install imagemagick

Fantastic stuff although I can never remember the commandline options.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: