11-22-2015
Many thanks, some brilliant suggestion guys. I'm going to get some sleep then make some improvements and test it again tonight. I'm self taught on scripting but I believe I maybe addicted.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to use unison from bash on windows with cygwin. I don't know if this is a cygwin question, bash question or unison question. Since I always get reprimanded by the cygwin mailing list for assuming it is a cygwin problem, I'll assume it is a bash question.
The following commands work... (7 Replies)
Discussion started by: siegfried
7 Replies
2. Shell Programming and Scripting
Hello,
So my knowledge of bash scripting is not that great and I have been trying to solve this problem on my own for awhile to no avail.
Here's the error I get when running it with an OS that uses bash 3.2.x:
testagain.sh: line 10: *-1: syntax error: operand expected (error token is... (2 Replies)
Discussion started by: forkandspoon
2 Replies
3. Shell Programming and Scripting
Halo,
Bash Script can get the time of process the trasaction or not?
For example, bash script use to procee the trasaction, like select and checking.. then generate the XML. after it, i need to get the time which to count the process.
Anyone can help me?
Thank you (1 Reply)
Discussion started by: ryanW
1 Replies
4. Shell Programming and Scripting
Hi,
Anyone know how to compare the time in bash script?
I want to compare say 30 min. to 45 min. ( AIX )
Thanks. (1 Reply)
Discussion started by: sumit30
1 Replies
5. Shell Programming and Scripting
Hi
I have an ftp script which works fine when i execute through a test scheduler(UC4), but when i run it through the prod scheduler(UC4), it hungs indefinetely, when we cancel the job and re-run it it works perfectly fine. here is the code,, any idea why this is happening ????
... (1 Reply)
Discussion started by: selvankj
1 Replies
6. Shell Programming and Scripting
HI,
I have a file serverlist in that all host names are placed.
i have written a small script
#./testping
#! /bin/bash
for i in `cat serverlist`
do
ping $i >> output.txt
done
so now it creates a file output.txt till here fine..
now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies
7. UNIX for Dummies Questions & Answers
Hello,
i have cronjob:
crontab -l
* * * * * pkill -f domexpcheck;sh /root/dom/domexpcheck.sh
it runs:
/var/log/cron
Mar 25 12:11:01 vps crond: (root) CMD (pkill -f domexpcheck;sh /root/dom/domexpcheck.sh)
but somehow script dont run properly via cronjob. But when i execute cronjob... (7 Replies)
Discussion started by: postcd
7 Replies
8. Shell Programming and Scripting
Hello,
I have a database file, named data.txt, and a shell script (convert.sh) to convert data.txt from columns to row. Output file name will be column_to_row.txt
In this example data.txt has only four rows.
Format of data.txt is:
info name surname telefon_nr
Data.txt
info boris... (1 Reply)
Discussion started by: baris35
1 Replies
9. Shell Programming and Scripting
Hi, I've got a Bash backup script I'm trying to run on a directory via a cron job nightly. If I ssh in and run the script manually it works flawlessly. If I set up the cron to run evertything is totally messed up I don't even know where to begin.
Basically the path structure is
... (6 Replies)
Discussion started by: wyclef
6 Replies
10. UNIX for Beginners Questions & Answers
The below command works in the terminal interactively but not as part of a bash script. I though maybe I needed to escape the "$dir" so it isn't interpreted literally, but that's not it. Thank you :).
interactively in terminal
dir=/path/to
new=$(ls "$dir"/*.csv -tr | tail -n 1) && echo... (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT OPENSOLARIS
sleep
sleep(3UCB) SunOS/BSD Compatibility Library Functions sleep(3UCB)
NAME
sleep - suspend execution for interval
SYNOPSIS
/usr/ucb/cc [ flag ... ] file ...
int sleep(seconds)
unsigned seconds;
DESCRIPTION
sleep() suspends the current process from execution for the number of seconds specified by the argument. The actual suspension time may be
up to 1 second less than that requested, because scheduled wakeups occur at fixed 1-second intervals, and may be an arbitrary amount longer
because of other activity in the system.
sleep() is implemented by setting an interval timer and pausing until it expires. The previous state of this timer is saved and restored.
If the sleep time exceeds the time to the expiration of the previous value of the timer, the process sleeps only until the timer would have
expired, and the signal which occurs with the expiration of the timer is sent one second later.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
cc(1B), alarm(2), getitimer(2), longjmp(3C), siglongjmp(3C), sleep(3C), usleep(3C), attributes(5)
NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system
libraries or in multi-thread applications is unsupported.
SIGALRM should not be blocked or ignored during a call to sleep(). Only a prior call to alarm(2) should generate SIGALRM for the calling
process during a call to sleep(). A signal-catching function should not interrupt a call to sleep() to call siglongjmp(3C) or longjmp(3C)
to restore an environment saved prior to the sleep() call.
WARNINGS
sleep() is slightly incompatible with alarm(2). Programs that do not execute for at least one second of clock time between successive calls
to sleep() indefinitely delay the alarm signal. Use sleep(3C). Each sleep(3C) call postpones the alarm signal that would have been sent
during the requested sleep period to occur one second later.
SunOS 5.11 30 Oct 2007 sleep(3UCB)