Sponsored Content
Full Discussion: Send sleep to background
Top Forums Shell Programming and Scripting Send sleep to background Post 302968585 by RudiC on Friday 11th of March 2016 07:25:51 AM
Old 03-11-2016
WHAT "did not work"?

sleep itself does NOT produce any output, as rovf correctly stated. And, as Scrutinizer said, leaving out the -x option will stop xtrace output (which, btw, would go to stderr anyway).
If you are talking of the loop just keeps looping frantically, that's because you put sleep into background, peacefully sleeping there, side by side, while the main loop continues and continues and ...
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sleep - Send Email

Working on a script to look in a directory for a certain file. If the file is not there, check the time. If the time is greater than 10:00, send me an email. If it's not, sleep for 15 minutes and then do this all over again. I can get it to email me if the file's not there without the sleep... (4 Replies)
Discussion started by: dstinsman
4 Replies

2. Shell Programming and Scripting

Send password : In Background

Hi All, How to pass the password in background.....? " /usr/bin/hdiutil attach -mountroot -stdinpass /path/to/mount/ /path/of/image/TEST.sparseimage " The above command asks the password to mount a sparse image and when supplied it gets mount. But my requirement is to use... (1 Reply)
Discussion started by: ashwin.patil
1 Replies

3. UNIX for Advanced & Expert Users

send a new value to a variable in a running background process

Hi guys, I have a issue with a background process, I need to update the value of a variable in that process which is running at this time and it will be running for at least 2 days. Any idea? I will apreciate your help. regards. Razziel. (2 Replies)
Discussion started by: razziel
2 Replies

4. Shell Programming and Scripting

Wrapping 'sleep' with my 'resleep' function (Resettable sleep)

This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way: How many times have you used the... (5 Replies)
Discussion started by: deckard
5 Replies

5. Shell Programming and Scripting

Send Foreground job to background redirecting output

I have many CPU intensive processes running and sometimes I run them in the foreground so that I can see what the output is. I want to send that foreground process to the background, but also have it direct the output to a logfile. I know to send something to the bg I do Ctrl-z on the FG... (6 Replies)
Discussion started by: jhullbuzz
6 Replies

6. Shell Programming and Scripting

Need help regarding sending sleep to background

Hi, can we print anything, when sleep is running..? like printing dots(.. . . . . . . . .) to indicate that some process is going on...? i mean, can we send sleep to background, proceed with printing, till sleep is going on... in s single step. I have written a funtion to solve this. ... (1 Reply)
Discussion started by: Dpu
1 Replies

7. UNIX for Dummies Questions & Answers

Send job to Background after input redirection

Hi, I am having issues with syntax when I am trying to send a job to the background after a input redirection. I have this script which sends some files to different servers after zipping them. Once I execute it, it will ask for user input as of which server the files need to go to. (The... (3 Replies)
Discussion started by: grep_me
3 Replies

8. UNIX for Dummies Questions & Answers

How do I send output of a background process to a file other than nohup.out?

I have a question. I will be running a background process using nohup and & command at end. I want to send output to a file say myprocess.out. So will this command work? nohup myprocess.ksh > myprocess.out & Thanks in advance guys !!! :) (3 Replies)
Discussion started by: vx04
3 Replies

9. UNIX for Advanced & Expert Users

Send current script to background

Hi scripters, I'm quite used to run commands in the background using & like in: $ myscript &But this is NOT what I'm trying to do today. What I'm trying to achieve is to run a script the normal way (without &), have my script do a little checkup and then jump to background. Something like:... (5 Replies)
Discussion started by: chebarbudo
5 Replies
CAFFEINATE(8)						    BSD System Manager's Manual 					     CAFFEINATE(8)

NAME
caffeinate -- prevent the system from sleeping on behalf of a utility SYNOPSIS
caffeinate [-disu] [-t timeout] [utility] [argument ...] DESCRIPTION
caffeinate creates assertions to alter system sleep behavior. If no assertion flags are specified, caffeinate creates an assertion to pre- vent idle sleep. If a utility is specified, caffeinate creates the assertions on the utility's behalf, and those assertions will persist for the duration of the utility's execution. Otherwise, caffeinate creates the assertions directly, and those assertions will persist until caffeinate exits. Available options: -d Create an assertion to prevent the display from sleeping. -i Create an assertion to prevent the system from idle sleeping. -m Create an assertion to prevent the disk from idle sleeping. -s Create an assertion to prevent the system from sleeping. This assertion is valid only when system is running on AC power. -u Create an assertion to declare that user is active. If the display is off, this option turns the display on and prevents the display from going into idle sleep. If a timeout is not specified with '-t' option, then this assertion is taken with a default of 5 second timeout. -t Specifies the timeout value in seconds for which this assertion has to be valid. The assertion is dropped after the specified time- out. Timeout value is not used when an utility is invoked with this command. EXAMPLE
caffeinate -i make caffeinate forks a process, execs "make" in it, and holds an assertion that prevents idle sleep as long as that process is running. SEE ALSO
pmset(1) LOCATION
/usr/bin/caffeinate Darwin November 9, 2012 Darwin
All times are GMT -4. The time now is 08:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy