The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Running RSH on the background eamani_sun Shell Programming and Scripting 2 06-02-2008 02:37 PM
Parameters and background gio001 UNIX for Dummies Questions & Answers 8 11-14-2007 05:18 PM
background process jerardfjay Shell Programming and Scripting 1 09-07-2005 12:03 PM
background job babayeve UNIX for Dummies Questions & Answers 3 05-25-2005 11:08 AM
Background job rdbooth UNIX for Dummies Questions & Answers 1 03-23-2004 07:59 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-26-2003
joerg's Avatar
joerg joerg is offline
Registered User
  
 

Join Date: Jan 2002
Location: Germany
Posts: 167
Unhappy background job

I try to run a script as background job.

script:
#!/usr/bin/csh
/usr/bin/date +20%y-%m-%d > ~/datsql.txt

If I start it I got this output:
tac> ./datermitteln&
[5] 293
[5] + Stopped (SIGTTOU) ./datermitteln&

I insert the following line inside my script, but without any advancement.
stty -tostop

Please help!
regards joerg
  #2 (permalink)  
Old 09-05-2003
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
It looks to me that your script only executes one "date" command and stops then....

What exactly are you trying to do with it?

With only one line it will execute immediately and then be finished...

If you want it to run indefinitely do this.

# vi datermitteln
while true
do
/usr/bin/date +20%y-%m-%d
done



However, that is a very strange command... If you are trying to capture this for another script, just assign it to a variable...


# DATE=`/usr/bin/date +20%y-%m-%d` # backtics btw...
# echo $DATE
2003-09-05
  #3 (permalink)  
Old 09-05-2003
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Kelam,

Joerg's issue seems to be with the job stopping - I had to set in the script to turn tostop on (stty tostop ) to get the script to have the same issue as Joerg. Unfortunately, I haven't had time to get back to it.

Joerg, I tried this on Solaris and HP-UX and could not make the job stop unless I set tostop (instead of turning it off like you were trying). What OS are you using?
  #4 (permalink)  
Old 09-05-2003
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
  
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
RTM, that was my point ... the script WILL stop b/c it only runs one command.

Maybe I am misunderstanding his problem... Does he want it to keep running or to stop running?

I cant find a use for this script myself... why not make it a variable in a script?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:15 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0