Thread: slocate
View Single Post
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#18
Originally Posted by rcull View Post
Benson

1. If this was one of the UNIX servers I have managed for the last 15 years, yes you would be right but this is a personal tablet. I don't know about you, but I, haven't got the memory of a goldfish and tend to know what I've done from one day to the next so I'm pretty unlikely to use it in another script.
My point was not that you would use it in a script (and watch it fail), but that you would be unable to use it in a script -- or, more importantly, a pipeline. And when you post in a public forum, it's not just your personal tablet. You're advising other people to install a script with wrong behavior on their systems without even mentioning the utility/convenience tradeoff you chose to make.
2. Both the script name and the '|more' are obviously optional.
Obviously to you and me, but not necessarily obvious to everyone who reads the forum. I was a beginner once, and would type things in without trying to understand them. Then I'd tinker with them to try to get it. While this script is small enough most people should understand, realize what the | more did, and remove it, there are some who wouldn't. All I tried to do with my first comment was point out that it was optional, and that there were reasons to consider removing it, instead of presuming everyone else would catch it.
3. I wonder which is the most '******ed' replacing an accurate (and available) time based tool (cron) with a script using 'sleep' or using accurate (and available) tools find and grep in a way they were meant to be used to replace something currently unavailable!
Wow, 2 strawmen in one sentence.
  1. I didn't suggest calling this crond! You could write a real crond in shell script, using the techniques applied in this, but I would strongly advise against calling anything that runs only one fixed task on a fixed schedule by the name of a general purpose tool. (That would be ******ed!) That script was intended as a separate daemon to solve one problem, while cron was (to my knowledge) unavailable.
  2. My claim was not that using find and grep to replace locate was ******ed, but that taking that (admirable, in itself) locate replacement and breaking it by sticking extra functionality in is ******ed, and I'll stand by that.
Lastly, I pride myself on having manners something you are obviously Not Familiar with.
I can see why you'd feel the need to point that out; few would guess it from your suggestions that others might have "the memory of a goldfish". I'd rather be right than polite, but to each his own.