The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Shell Programming and Scripting
Is it possible??
Tags
shell scripts
Login to Discuss or Reply to this Discussion in Our Community
Page 1 of 2
1
2
>
Thread Tools
Search this Thread
Top Forums
Shell Programming and Scripting
Is it possible??
#
1
08-22-2008
vidyadhar85
Registered User
2,050,
105
Join Date: Jun 2008
Last Activity: 9 June 2020, 12:25 AM EDT
Location: INDIA, Bangalore
Posts: 2,050
Thanks Given: 16
Thanked 105 Times in 102 Posts
Is it possible??
I have following script..
Quote:
while :
do
date
done
which print date on screen continuously..
i start it on command line..
once its started it will go on...
IS THERE ANY WAY TO SEND TO TO BACKGROUND ONCE ITS STARTED???
thanks,
vidya...
vidyadhar85
View Public Profile for vidyadhar85
Find all posts by vidyadhar85
#
2
08-22-2008
jim mcnamara
Registered User
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
Because you have the date command which wants to write to stdout, without redirecting the date command you will get a SIGTTOU.
What are you trying to do? make some kind TSR program that shows time?
jim mcnamara
View Public Profile for jim mcnamara
Find all posts by jim mcnamara
#
3
08-22-2008
redoubtable
Registered User
244,
0
Join Date: Aug 2008
Last Activity: 7 December 2010, 12:28 PM EST
Location: Portugal
Posts: 244
Thanks Given: 0
Thanked 0 Times in 0 Posts
You can cheat and create a
screen
(GNU screen) before starting the script and then detaching from the screen: Ctrl-A, d.
redoubtable
View Public Profile for redoubtable
Find all posts by redoubtable
#
4
08-22-2008
Danny.Chouinard
Registered User
21,
0
Join Date: May 2008
Last Activity: 26 February 2012, 7:58 AM EST
Posts: 21
Thanks Given: 0
Thanked 0 Times in 0 Posts
You also really should put a "sleep 1" in the loop, as executing the date program non-stop like that will eat up your CPU cycles like crazy.
No point in printing the time zillions of times every second.
If all you want is a digital display of the current time, consider using xclock like so: xclock -digital -update 1 &
Danny.Chouinard
View Public Profile for Danny.Chouinard
Find all posts by Danny.Chouinard
#
5
08-23-2008
vidyadhar85
Registered User
2,050,
105
Join Date: Jun 2008
Last Activity: 9 June 2020, 12:25 AM EDT
Location: INDIA, Bangalore
Posts: 2,050
Thanks Given: 16
Thanked 105 Times in 102 Posts
guys guys..
it was just a example..
Quote:
my question is is it possible to move a running script to backend??
vidyadhar85
View Public Profile for vidyadhar85
Find all posts by vidyadhar85
#
6
08-23-2008
matrixmadhan
Registered User
3,216,
33
Join Date: Mar 2005
Last Activity: 4 September 2020, 7:11 AM EDT
Location: classification algos
Posts: 3,216
Thanks Given: 19
Thanked 33 Times in 30 Posts
yes, its definitely possible
switching process between background and foreground is definitely possible
matrixmadhan
View Public Profile for matrixmadhan
Find all posts by matrixmadhan
#
7
08-23-2008
vidyadhar85
Registered User
2,050,
105
Join Date: Jun 2008
Last Activity: 9 June 2020, 12:25 AM EDT
Location: INDIA, Bangalore
Posts: 2,050
Thanks Given: 16
Thanked 105 Times in 102 Posts
Quote:
Originally Posted by
matrixmadhan
yes, its definitely possible
switching process between background and foreground is definitely possible
how??
vidyadhar85
View Public Profile for vidyadhar85
Find all posts by vidyadhar85
Page 1 of 2
1
2
>
Login or Register to Ask a Question
Previous Thread
|
Next Thread
Login or Register to Ask a Question
Member Badges and Information Modal
×