|
|
|
|
|
|
| Author |
Message |
dwmyers@my-deja.com *nix forums beginner
Joined: 11 Feb 2005
Posts: 5
|
Posted: Fri Feb 11, 2005 3:23 pm Post subject:
Re: New site for my shell coding page
|
|
|
I don't claim to be in the "Dan Mercer" category as a writer of shell.
Compared to him, I'm a putz. I come here to learn.
I wrote this document to get rid of the frustration I felt when I read
startup scripts with no documentation, no date of creation, no hash
bang at the top, with conditional expressions that scared the devil out
of me..
One such piece, and I wish I remembered the code, was a series of pipes
where "kill 1" was a logical possibility.
Shouldn't you trap for those kinds of things in production code?
David. |
|
| Back to top |
|
 |
Michael Tosch *nix forums Guru
Joined: 21 Feb 2005
Posts: 539
|
Posted: Fri Feb 11, 2005 2:33 pm Post subject:
Re: New site for my shell coding page
|
|
|
dwmyers@my-deja.com wrote:
| Quote: | The title of the page is:
"On the Development of a Shell Scripting Style and Standard"
The url is:
http://home.comcast.net/~dwm042/Standards.htm
There was a time when I could google my own page and it would come up
in the first 5 or so hits on google. That was when it was hosted by
mindspring, which seemed to give a care whether people's home pages
were searchable.
It seems to be invisible now.
So, for those who maintain shell scripting links, I'd like to ask a
favor and if this page is good enough, please include them among your
links.
Yes, it will be of benefit to me, I promise, and thanks.
David.
|
I had a short look to the URL, and the following comment:
ps –ef | grep $1 | grep –v grep | while read f Pid f ; do
kill –9 $Pid
done
is one of these examples where PATH should be set to guarantee the correct
versions of ps and grep are found.
Also note that
grep -w $1 | grep -vw grep | ...
is more exact, and
ps -eo pid,comm | awk '$2!="awk"' | ...
is even better, and
pkill -x "$1" && sleep 5 && pkill -9 -x "$1"
is probably most exact.
But the more exact the expression is, the less portable it becomes.
--
Michael Tosch @ hp : com |
|
| Back to top |
|
 |
dwmyers@my-deja.com *nix forums beginner
Joined: 11 Feb 2005
Posts: 5
|
Posted: Fri Feb 11, 2005 1:54 pm Post subject:
New site for my shell coding page
|
|
|
The title of the page is:
"On the Development of a Shell Scripting Style and Standard"
The url is:
http://home.comcast.net/~dwm042/Standards.htm
There was a time when I could google my own page and it would come up
in the first 5 or so hits on google. That was when it was hosted by
mindspring, which seemed to give a care whether people's home pages
were searchable.
It seems to be invisible now.
So, for those who maintain shell scripting links, I'd like to ask a
favor and if this page is good enough, please include them among your
links.
Yes, it will be of benefit to me, I promise, and thanks.
David. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Fri Jan 09, 2009 1:17 am | All times are GMT
|
|
Loans | Watch Anime Free Online | Bankruptcy | WoW Gold | Looking for Credit Cards?
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|