>> > try
>> > $ ps -ef | grep [n]tpd
>[...]
>>
>> this is funny, but
>> ps -ef | grep ntpd | grep -v grep
>> is much cleaner in my opinion
>Perhaps now so much in this case... but in a general sence something that
>can be done in 1 process is always better than using 2. Other wise you
>might find your machine dieing the death of a thousand cuts.
>
>Get a few hundred of these going in some shell script in a cronjob and
>you'll be wondering where all your ram and cycles went. "There's nothing
>intersting in top..." Then you'll curse a few times at the admin who had
>the job before you did.
>
>Sorry.. didn't meant to sound bitter there... ;)
don't worry i dont' mind
of course if you are writing scripts or programs that are to be heavily
used in a system programming context it's good to keep performance and
resource consumption in head and avoid any wasting.
but if you are in the context of time-to-time scripts then readability is
important too.
if you are alone progamming your machine, you are supposed to know what you
do, and remember what you wanted to do monthes or years later.
in a professional context, or at least when you are not alone, you are
supposed to write things that others can read, understand, and maintain
too, not depending on you, and even years later. that's why i'd give an
advise to all : unless performance is an issue, better write a readable
code even if there are more steps than necessary, than a quick code that
only a few can read (and of course please add comments !)
the problem when writing things like that (grep [n]tpd) is that unaware
people just copy the commands as-is and do not understand why it has been
written so. then they are even not able to explain to another why they
wrote that, and when updates are necessary, it all breaks down...
have a nice week end !
- * - * - * - * - * - * -
Mes idees n'engagent que moi (vieux proverbe du Net)
Thierry ITTY
eMail: [EMAIL PROTECTED] FRANCE
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list