LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] bash: nohup can't see a function

[ILUG] bash: nohup can't see a function

Stephen Shirley diamond at skynet.ie
Thu Jun 2 11:26:41 IST 2005


Stephen Shirley wrote:
> bryan ( admin at revoltingdigits.com) wrote:
> 
>> then ( restartoraclegui | mail admin\@revoltingdigits.com -s "oracle 
>> gui restart" 2>&1 ) 
> 
> 
> Why not just add a cron task?
> 
> 0 22 * * * /path/to/restartoraclegui
> 
> should run it every night at 10pm.

Oops. Didn't read it properly, restartoraclegui is a function. Make it a 
shell script, put it in your path (i suggest either ~user/bin, or 
/usr/local/bin). Functions are useful for stuff you're going to run 
yourself by hand. They're loaded into memory and so execute faster. 
Outside of there, there's no good reason to use them that i can think 
of. When being run by something other than you in an interactive shell, 
you just end up with the same or more overhead than using a shell script.

Steve



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell