When I trying your bash script, it shown the below error message:
This is the list of my available input file:
Script that I edit based on your advice:
Thanks for your advice.
Hi,
In Linux how to find out what will be the stack size allocated for a process?
Actually i have to fork n number of processess, and will call exec. I will be execing an executable which is already multithreaded and each thread size is defined. My doubt is how to know if the size of the... (2 Replies)
I want to find out how many disk blocks are used by only data (and not metadata) by a file.
But as far as I can tell, if the file has holes, then there is no way to know this.
You can find out the logical size of the file (physical size + hole blocks).
You can get the physical size of the... (3 Replies)
Hi,
I want to know the command which can be used for finding the % of disk space occupied by files & sub-folders inside a given mount in Sun Solaris
For eg: I have /tmp/ folder when I sat df -k it will give the percentage of space used by /tmp/.
Say if I want to see how much % the files &... (2 Replies)
Hi Friends..
I have a small problem with the hostname of my system.I had installed Solaris 10 X86 on Vmware in my windows 2000 system.After booting of my solaris system,if i give check-hostname command it says ,,
hostname is not fully qualified ,,change the hostname to hostname.xxx.xxxxxx.com... (3 Replies)
Hi,
This is the Third thread i'm putting here for the same problem. :(
Actually, i'm trying a script like this.. but its taking a long time.. about 3 days to complete fully..
#!/bin/ksh
if
then
exit 1
fi
while read i
do
while read j
do
field7=`echo $j|cut -d "|"... (12 Replies)
hi
actually i want to get fully qualified path name of the file when the file name is entered as command line argument while running a shell script
ex. if i run the shell as $./test.sh ./nsdnet_file.csv
the it should display me the full path of the file like
/dialp/Release/bin/nsdnet_file.csv... (3 Replies)
I want to extend this script.
This must also be able to show me that a port is already assigned to a service but not running now
there must be three different messages
port 8949 is open but not listening
port 8959 is open
port 8999 hasn't been assigned to any service.
I know that... (1 Reply)
Guys,
Can some one help me?
I need to find the total percent of space occupied by core files on my unix system.
I know df -k will give me the percent space utilization for a directory but how do we replicate the space for a file? (3 Replies)
I tried changing my /etc/inet/hosts file for my server to:
<ip address> <hostname> <fqdn>
but when I go to reboot the file changes right back to:
<ip address> <hostname>
how do I get the <fqdn> to stick on a reboot.
Thanks (2 Replies)
I am new to scripting and this is probably the 4th or 5th simple script I have written. I am working with a HUGE number of data that need to be organized into folders and named a certain way. I wrote the naming script using a while function to go through the 1000-some folders and rename the files... (0 Replies)
Discussion started by: notluckyhannah
0 Replies
LEARN ABOUT DEBIAN
tryto
tryto(1) General Commands Manual tryto(1)NAME
tryto - tries to run a command limited by a timeout or number of tries, can be used to run as svlogd(8) processor.
SYNOPSIS
tryto [-pPv] [-t sec] [-k ksec] [-n tries] prog
DESCRIPTION
prog consist of one or more arguments.
tryto runs and watches prog, feeding its standard input to prog's standard input. If prog exits with a return code other then 0, tryto
runs prog again after sleeping one second.
If the number of retries reaches the maximal number of tries, tryto prints an error message and gives up.
If the timeout sec seconds is reached and prog is still running, tryto sends a TERM signal to prog, waits ksec seconds for prog to termi-
nate, then sends a KILL signal if prog still is there, and exits as soon as possible.
OPTIONS -t sec timeout. Set the timeout to send TERM to prog to sec seconds. Default is 180.
-k ksec
kill timeout. Set the timeout to send KILL to prog to ksec seconds. Default is 5.
-n tries
Set the maximal number of tries to tries. If prog exited with a return code other that 0, tryto tries to rewind standard input to
the beginning using lseek(2) before starting prog again. Default is 5.
-p processor. Use this option if you run tryto as a svlogd(8) processor (see below).
-P process group. Run prog in a new session and process group, and send signals on timeout to prog's process group instead of its pid.
-v verbose. Print verbose messages to standard error.
PROCESSOR
If tryto sees the -p option, tryto runs as a svlogd(8) or multilog(8) processor, making use of filedescriptors 4 and 5:
Before starting prog, tryto moves the filedescriptor 5 to 2, so all error messages from tryto and prog will be saved in svlogd(8)'s state
to be processed on the next run of tryto -p.
After starting prog, tryto first feeds all data it reads from filedescriptor 4 into prog's standard input, then all data from filedescrip-
tor 0.
If prog fails by timeout sec seconds or maximal number of tries, tryto prints all data from standard input to standard output, an error
message to standard error, and exits with 0.
EXIT CODES
If tryto itself fails, it returns 111.
If tryto runs as a svlogd(8) processor, tryto returns 0 in all other cases.
If prog was run successfully, tryto returns 0.
If prog failed by timeout, tryto returns 100.
If prog failed by maximal number of tries, tryto returns the last return code from prog.
SEE ALSO socklog(8), uncat(1), svlogd(8), multilog(8), lseek(2)
http://smarden.org/socklog/
http://smarden.org/runit/
AUTHOR
Gerrit Pape <pape@smarden.org>
tryto(1)