Domain: partmaps.org
Stories and comments across the archive that link to partmaps.org.
Comments · 9
-
Re:Just do it the other way around
cat file.csv | perl -ne '@a=split/,/; $tmp = $a[11];
.... ' > new_file.csv, load the new CSV, check for errors, debug, repeat... sometimes is just a one-time task I need to do.Here is your UUOC award
:D -
Re:Wat
You earned yourself a Useless Use of Cat Award!
I would not agree with that. Yes, very often, cat is not necessary, strictly speaking; for example, the list of arguments could be directly passed to grep in this case. However, personally I consider it to be bad style. A verbose cat (i) doesn't cost anything in terms of memory or CPU (if it does, then 1981 called, they want their computer back), (ii) facilitates or invites additional filters, for example adding sort -u (or sort | uniq, as I would rather have it), (iii) makes the whole pipeline more readable. I find it especially funny when people who do not hesitate to launch a terrible misuse of resources (also know as a "Web browser") hesitate to put an additional cat command to a long pipeline.
-
Re:Wat
You earned yourself a Useless Use of Cat Award!
When did using cat (aka 'concatenate files and print on the standard output') to concatenate multiple files and print them to the standard output as input to another command become 'useless use of cat'?
-
Re:Wat
-
Re:Strange names
How much can you improve a 100 line program that does nothing by concatenate streams?
Make it a shell built-in and chide the user if only a single input was used (e.g. cat file | grep blah).
-
Re:Short Answer
-
Re:Lol
Here is your Useless Use of Cat Award
;) -
Re:A simple suggestion
What we really need is some slashdot troll that goes around awarding UUOC awards.
-
Re:I feel vindicated with this piece...
Kioslaves are usable everywhere in KDE, the main GUI. That is part of the OS, depending on your definition of OS.
But the thing is, people don't pick desktop environments because of the brand. They pick programs that work.
I'm a GNOME user, but I use a bunch of KDE apps. GIMP still kicks Krita's butt. Psi is better than all GNOME Jabber clients combined. gDesklets appears to actually work, as opposed to SuperKaramba. Amarok appears to actually work, as opposed to Rhythmbox.
Part of my world has kioslaves. That's what's so aggravating to the users. That's why implementing them on the app library is bad.
And putting them in the app library is even more fun. (I can't open URLs in GIMP at all. Well, I can't do that in Scribus either, so I guess that evens it out.)
If you mean back down to the non-GUI level, then you need to use the correct tool for the job.
Ah. But think of it this way: You're advocating two kinds of applications. First, there are KDE apps, where every application is the "correct tool for the job", whether designed for the job or not. You can rip CDs in your word processor if you know how, thanks to the miracle of kioslaves.
Then, you're advocating the non-GUI tools which don't have that luxury and you're supposed to use the correct tool for the job. No, you can't use LaTeX and GNUPLOT to typeset an automated analysis and a frequency plot of a music file you rip from CD, but for a handy Unix guy with a solid grip of shell scripts (and maybe a bit of Perl), that's not a problem at all! It's all in the pipelines! Good old Unix stuff!
So which is better? In Unix, everything is about the pipes. If you could open() an file that's actually defined as an URL, you could use any tool, not just GUI apps, to open it.
And by the way, it's curl <url>. I hates® it when cURL dumps everything on to standard output, unlike wget which dumps everything to a guesstimatingly named file. I award you today's Useless Use of cat Award for suggesting curl
... | cat. =)And I'll second his complaint about not being able to type a URI directly in the dialog box. Having to fucking point, click, point, click, point, click, ad infinitum to get to a deeply nested folder was the last straw for me and Gnome.
I can open files just fine in GNOME apps without touching the mouse at all or squint around. remembering how the file name begins helps tremendously, I can just type the first few letters and it jumps there.
I still don't know where you supposedly can't type. I can type just fine in the file dialogs.