Sponsored Content
Top Forums UNIX for Advanced & Expert Users Redirection? (I do find some of the strangest things.) Post 302989233 by RudiC on Tuesday 10th of January 2017 07:36:38 AM
Old 01-10-2017
Did you check the exit code of the command in either case?
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

i get the strangest feeling that lilo hates me.

i need to get rid of lilo's splash screen. i've heard that you can edit your /etc/lilo.conf and add this line: <b>append="splash=0"</b> anyway, i did that and i still have a splash screen. any idea why that didn't work, or what is another way to disable the splash screen? okay, -nydel (1 Reply)
Discussion started by: nydel
1 Replies

2. Programming

Complicating things?

So basically what im trying to do is ... Open file, read that file, than try to find .. We or we and replace them with I, but not replace the cases where words contain We or we, such as Went, went, etc a and replace them with the, but not replace the cases where words contain a, such as... (1 Reply)
Discussion started by: bconnor
1 Replies

3. Programming

Question about several things in C

Hey guys, first of all I'd like to say Hi to everyone. I am new here and this is my first post. I have a question about some C stuff. I am in Computer Science and I have an assignment for a UNIX Applications course. It is really complicated, however. We're using the C language for this and... (1 Reply)
Discussion started by: V4D3R
1 Replies

4. UNIX for Advanced & Expert Users

shell redirection in find

hi, i need to clear data off a DOA backup drive. i try this, but just get a file {} in . and no change on the backup drive. bash shell find /mnt/usbbackup -xdev -type f -exec echo `date` > {} \; any ideas? thanks. :) (1 Reply)
Discussion started by: drewnichols
1 Replies

5. UNIX for Dummies Questions & Answers

Just trying to find out a few things ....

Hi everyone Just a couple of quick questions if I may. Can I ask what is meant by "flavours"?? I've come across it many times in the forums and I'm guessing that it is a variery of either Linux or UNIX (I know nil about either) which has developed but not really got a clue. ... (1 Reply)
Discussion started by: Tiramisu
1 Replies

6. Shell Programming and Scripting

Several exec on find send all the output to the last redirection

Example script: find mydir -type f -exec echo {}>aaa \; -exec echo {}>bbb \;The two paths go the the bbb file, while there should be one of them on each file. How should I do it to get it working? (2 Replies)
Discussion started by: Tribe
2 Replies
hatimerun(1M)						  System Administration Commands					     hatimerun(1M)

NAME
hatimerun - run child program under a timeout SYNOPSIS
/usr/cluster/bin/hatimerun -t timeOutSecs [-av] [-e exitcode] prog args /usr/cluster/bin/hatimerun -t timeOutSecs [-v] [-e exitcode] [-k signalname] prog args DESCRIPTION
The hatimerun utility provides a convenient facility for timing out the execution of another child, program. It is useful when programming in scripting languages, such as the Bourne shell. See sh(1). The hatimerun utility runs the program prog with arguments args as a child subprocess under a timeout, and as its own process group. The timeout is specified in seconds, by the -t timeOutSecs option. If the timeout expires, then hatimerun kills the child subprocess's process group with a SIGKILL signal, and then exits with exit code 99. You can run this command in the global zone or in a non-global zone. The command affects only the global or non-global zone in which you issue the command. OPTIONS
The following options are supported: -a Changes the meaning of hatimerun radically: instead of killing the child when the timeout expires, the hatimerun utility sim- ply exits, with exit code 99, leaving the child to run asynchronously. It is illegal to supply both the -a option and the -k option. -e Changes the exit code for the timeout case to some other value than 99. -k Specifies what signal is used to kill the child process group. The possible signal names are the same as those recognized by the kill(1) command. In particular, the signal name should be one of the symbolic names defined in the <signal.h> descrip- tion. The signal name is recognized in a case-independent fashion, without the SIG prefix. It is also legal to supply a numeric argument to the -k option, in which case that signal number is used. It is illegal to supply both the -a option and the -k option. -t Specifies the timeout period, in seconds. -v Verbose output, on stderr. EXIT STATUS
If the timeout occurs, then hatimerun exits with exit code 99 (which can be overridden to some other value using the -e option). If the timeout does not occur but some other error is detected by the hatimerun utility (as opposed to the error being detected by the child program), then hatimerunhatimerun exits with exit code 98. Otherwise, hatimerun exits with the child's exit status. The hatimerun utility catches the signal SIGTERM. It responds to the signal by killing the child as if a timeout had occurred, and then exiting with exit code 98. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
kill(1), sh(1), attributes(5) Sun Cluster 3.2 10 Apr 2006 hatimerun(1M)
All times are GMT -4. The time now is 04:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy