Re:Cronic - A cure for Cron's chronic email problem
by ajross on Thursday May 24, 2012 @11:04PM
(#4021695)
Which tools are you talking about? The standard software suite is basically identical between the systems. And what differences there are lie in the implementations of the core stuff, whose behavior is specified by POSIX for the most part.
I'm sure there are exceptions somewhere. But in something you'd throw into a cron job? Frankly, that seems like a very weird snipe.
Re:Cronic - A cure for Cron's chronic email problem
by emmelaich on Thursday May 24, 2012 @11:10PM
(#4021707)
I'm guessing ls which colors; perhaps keychain (very colorful output).
I see less of the license stuff these days but no doubt there's a few around.
Re:Cronic - A cure for Cron's chronic email problem
by ciupicri on Thursday May 24, 2012 @11:36PM
(#4021767)
On Red Hat based systems, ls is an alias for ls --color=auto which means that colors are used only on terminals, not pipes or files.
Re:Cronic - A cure for Cron's chronic email problem
by ajross on Friday May 25, 2012 @11:38AM
(#4023924)
And no one should ever be using ls in a shell script anyway. Shell globbing and find are the proper tools.
Re:Cronic - A cure for Cron's chronic email problem
by liw on Friday May 25, 2012 @04:17AM
(#4022515)
Debian has this as well. I do "unalias -a" whenever I log into an account I haven't configured to my liking yet (I want no ls coloring, but I do want a bash prompt in boldface).
Re:Cronic - A cure for Cron's chronic email problem
by gcr on Thursday May 24, 2012 @11:36PM
(#4021768)
I think it's an OSX-ism.
Most OSX devs I've seen treat their command-line utilities like their GUI utilities, with nice looking albeit chatty output.
These utilities then get released into the Linux world, where they often work without any modification.
Re:Cronic - A cure for Cron's chronic email problem
by wisty on Friday May 25, 2012 @03:27AM
(#4022384)
Or it's just younger devs, who like to see something when they run their program.
Re:Cronic - A cure for Cron's chronic email problem
by gcr on Saturday May 26, 2012 @05:14PM
(#4028385)
Yes, exactly this. I know I'm guilty of wanting to see something cool happen. :)
Re:Cronic - A cure for Cron's chronic email problem
by zarify on Friday May 25, 2012 @04:05AM
(#4022481)
I remember getting an angry email from someone because of this when I was back at uni, had just finishing installing a linux box at home, but hadn't finished configuring everything. I went to bed while it was busily running cron jobs throughout the remainder of the night and emailing the output to someone else who had the same username at my ISP as the local one I'd set up on the machine. I don't think he saw the funny side of it sadly.
Re:Cronic - A cure for Cron's chronic email problem
by enneff on Friday May 25, 2012 @12:00AM
(#4021841)
You're bang on. Commands should do what you tell them and say nothing unless something unexpected occurred. (or, if you asked them to say something)
Cron isn't broken. It's chatty programs that are broken.
Re:Cronic - A cure for Cron's chronic email problem
by regularfry on Friday May 25, 2012 @04:21AM
(#4022525)
So you can scream at the darkness or light a candle. It doesn't matter which is broken if you can only fix one.
Re:Cronic - A cure for Cron's chronic email problem
by zobzu on Thursday May 24, 2012 @11:44PM
(#4021798)
I don't quite think that its a "gnuism" to do that. They generally take a --color option which of course is off by default.
They did sometimes put the license everytime, a long time ago, but I don't see that anymore unless you ask the version or help.
Re:Cronic - A cure for Cron's chronic email problem
by liw on Friday May 25, 2012 @04:15AM
(#4022507)
GNU programs that show a license and copyright information at startup do so when used interactively, not when in batch mode. For example:
echo 1 + 2 | bc
That doesn't produce anything except "3", even with GNU bc.
This interacts badly with many unix commands, which often send status info to standard out. Some commands have a quiet options, but that can turn off all error output too.
Maybe it's that I've mostly been administrating BSD machines, and so most of the tools follow old Unix guidelines like not printing anything unless it's necessary, echoing errors to stderr, using proper exit statuses, etc. (http://fmg-www.cs.ucla.edu/geoff/interfaces.html) I think it's a GNUism/Linuxism that commands are overly chatty, writing junk all over stdout (like author/license information - do we need to see this every single time?), and using ANSI colors by default.