Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Automatically executing a command Post 68712 by robbiegregg on Wednesday 6th of April 2005 11:46:25 AM
Old 04-06-2005
Thanks VERY much Perderabo.

Never used PERL before but quite impressed with your comment. I replaced the sleep 1" command with your perl line.

The script now "states" it is using 0.0% of the CPU resources which is great.

The final script (csh) I am now using is as follows:

#
set n = 0

while ( $n <= 10 )
if( -e ./hello) then
echo "Hello file is here"
rm hello
else
perl -e 'select(undef,undef,undef,.1)'
endif

end
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Executing a unix command

Hi, I need to execute the following unix command through my java code - zip -e When i execute this command from the command prompt, i am prompted for a password in the following manner - Enter password: Verify password: Is it possible to provide the password inthe first command itself... (5 Replies)
Discussion started by: jacob23
5 Replies

2. Shell Programming and Scripting

run a command automatically after every 10 mins

Hi friends, I need to write a script which runs a command (on that particular server only) after every 10 mins, and the contents are also echoed on that very terminal only. And then I need to compare the last two outputs, and mail if there is any difference in the last two outputs. Can we set... (4 Replies)
Discussion started by: vikas027
4 Replies

3. UNIX and Linux Applications

How to automatically detect command failure

I have a shell script. In this script I executes various command and my requirement is such that if any command fails I've to terminate the shell script. To achieve this objective I'm checking the value of $? after each command and if its value is greater thaen I 'exit' the script. Is there... (2 Replies)
Discussion started by: ashok2008
2 Replies

4. Shell Programming and Scripting

automatically answer a question raised by a command

i have installed vmware on a text base linux node now i have to vmware-configure.pl to do the initial configuration now 1st step it askes for agreeing for a " License Agreement" for that i have to say "q" and "yes" to Accept it i want to run a script with does these 3 steps... (6 Replies)
Discussion started by: pbsrinivas
6 Replies

5. UNIX for Dummies Questions & Answers

xterm closing automatically after command excution

Hi, I have a commands in a file called commands.file, I am using this file with the following commnad xterm -e "commands.file" After executing this file in the new xterm, it is closing automatically. I want to use that xterm after that. Please help me regarding this? :) ... (4 Replies)
Discussion started by: chaitubek
4 Replies

6. Shell Programming and Scripting

cd command not executing in if else loop

Hi, I am executing below script s1=`pwd` s2=/space if then echo "done" else echo "mistake" cd /tmp fi I am not able to migrate to /tmp directory if the condition is not true.However mistake is being printed.Means cd command is not working here.All other commands except cd are... (3 Replies)
Discussion started by: d8011
3 Replies

7. Shell Programming and Scripting

Automatically invocation of unix command

Dear All, I have a directory when i received files by means of FTP, i want to invoke my shell scripts as soon as file hit the directory, if the files hit 10 times then the shell scripts should also get executed 10 times. thanks rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies

8. Shell Programming and Scripting

In put password automatically to sftp command

Hi all, i have to sftp a file to another server I don't have "expect" or sshpass on my machine its solaris 10, i want to pass password in command line or after doing this sftp user@server how to automatically provide the password as input ( stored in some variable or so) ... (1 Reply)
Discussion started by: zozoo
1 Replies

9. Shell Programming and Scripting

Automatically enter input in command line

Hi, This is a script which to create an opvn user, I want which answer automatically to a certain part so, I try this, it works without the red part but I must type manually.. : #!/bin/bash ## Environnement ## LC_ALL=C ## Paths ## rsa_dir="etc/openvpn/easy-rsa"... (10 Replies)
Discussion started by: Arnaudh78
10 Replies

10. Red Hat

Warn Before Executing Particular Command

I'm running CentOS 6.8 and use bash. I would like a warning to appear to the user who runs the command "service httpd restart" E.g. # service httpd restart are you sure y/n n # (or if y, the command executes). I looked into it a little but am not sure of the best approach. Aliases I... (2 Replies)
Discussion started by: spacegoose
2 Replies
taskstat(1M)						  System Administration Commands					      taskstat(1M)

NAME
taskstat - prints ASET tasks status SYNOPSIS
/usr/aset/util/taskstat [-d aset_dir] DESCRIPTION
taskstat is located in the /usr/aset/util directory. /usr/aset is the default operating directory of the Automated Security Enhancement Tool (ASET). An alternative working directory can be specified by the administrators through the aset -d command or the ASETDIR environment variable. See aset(1M). Because aset dispatches its tasks to run in the background, when it returns, these tasks may or may not have com- pleted. taskstat prints the status of the tasks, listing those that are completed and those that are still executing. The ASET reports, which are located in the /usr/aset/reports directory (see the -d option), are not complete until all the tasks finish executing. OPTIONS
-d aset_dir Specify the working directory for ASET. By default, this directory is /usr/aset. With this option, the reports directory will be located under aset_dir. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWast | +-----------------------------+-----------------------------+ SEE ALSO
aset(1M), attributes(5) System Administration Guide: Basic Administration SunOS 5.10 11 Oct 1991 taskstat(1M)
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy