Live data from Hacker News

An introduction to data processing on the Linux command line

blog.robertelder.org

11–20 of 73 posts

Re: An introduction to data processing on the Linux command line

#11
post #5

Huh, so it turns out that I've been a 'data scientist' for over 20 years. Who knew?

That was my first thought skimming through this too. Either every *nix admin who is aware of a few text processing tools is a data scientist, or “data scientists” are just as full of it as I’ve expected.

Re: An introduction to data processing on the Linux command line

#13
When I was at a genetics lab, I was helping some researchers on something and spent 3 days writing a perl script, which kept failing. I sent an email to one of the guys who wrote the paper the research was being based on, and he said, why not try awk like this? With a little work, I turned 3 days of perl into a 1 line awk that was faster than anything else for the job at the time. That was an inspirational moment for the fundamental power of the unix philosophy and the core utilities in linux for me.

Good introductory article here!

Re: An introduction to data processing on the Linux command line

#14
This is a great list and well-written. As a data professional, I use these commands all the time and my job would be much harder without them. I also learned a few new things here (`tee` and `comm`).

I was lucky that my first job was as a support engineer at a data-centric tech company, which is where I learned these. I've often thought about how to teach them to data analysts coming from a non-engineering background. This is comprehensive but clear and would be a perfect resource for training someone like that. Thank you!

Re: An introduction to data processing on the Linux command line

#16
I'll just leave one of my past comments [1] here.

[1] https://news.ycombinator.com/item?id=17324222

P.S.: Not essential, but it really becomes a joy when, as a touch typist, I have turned on vi mode in the shell (e.g., with 'set -o vi'). My fingers never have to leave the home row while I do my shell piping work from start to finish. (no mouse, no arrow keys, etc.)

Re: An introduction to data processing on the Linux command line

#18
post #11
post #5

Huh, so it turns out that I've been a 'data scientist' for over 20 years. Who knew?

That was my first thought skimming through this too. Either every *nix admin who is aware of a few text processing tools is a data scientist, or “data scientists” are just as full of it as I’ve expected.

Just because a tool can be used for A, B or C, and you are an expert at using that tool for A does not imply that your expertise at using the tool for A makes you an expert in B and C.

The whole point of this article is to point out that a lot of common Linux tools can be used for Data Science like work (a significant part of which includes pre processing structured and unstructured text).

Re: An introduction to data processing on the Linux command line

#19
post #15

Can somebody explain the advantage of doing it on the command line vs in Python or R? What would a practical use case look like?

The most significant use case for all things command-line IMHO is automation. Also, I would change that from "command line vs in Python or R" to "command line and Python or R". Build a pipeline like I've discussed in the article, then pipe it into Python or R.

Re: An introduction to data processing on the Linux command line

#20
Useless use of cat detected!

Rememeber, nearly all cases where you have:

  cat file | some_command and its args ...
you can rewrite it as:

  
and in some cases, such as this one, you can move the filename to the arglist as in:

  some_command and its args ... file
— Randal L. Schwartz (http://porkmail.org/era/unix/award.html#cat)
Post reply on HN