niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » shell
New site for my shell coding page
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
dwmyers@my-deja.com
*nix forums beginner


Joined: 11 Feb 2005
Posts: 5

PostPosted: Fri Feb 11, 2005 3:23 pm    Post subject: Re: New site for my shell coding page Reply with quote

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

PostPosted: Fri Feb 11, 2005 2:33 pm    Post subject: Re: New site for my shell coding page Reply with quote

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

PostPosted: Fri Feb 11, 2005 1:54 pm    Post subject: New site for my shell coding page Reply with 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.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 1:17 am | All times are GMT
navigation Forum index » Programming » shell
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Insert header and footer in every page served by proxy ehmedk Apache 0 Tue Apr 22, 2008 6:27 pm
No new posts Insert header and footer in every page served by squid ehmedk Squid 0 Tue Apr 22, 2008 6:16 pm
No new posts Organizer for internal site? Joe DiMaggio PHP 2 Thu Jul 20, 2006 6:00 am
No new posts Coding standard Carlos Martinez C++ 7 Wed Jul 19, 2006 11:48 am
No new posts online man page Ralph.Lam@gmail.com shell 0 Wed Jul 19, 2006 8:28 am

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
[ Time: 0.2531s ][ Queries: 20 (0.1627s) ][ GZIP on - Debug on ]