07-11-2012
This works a treat. 3 times faster now.
Thank you.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to write a script which will loop until a certain action has been performed. I have two files i would like to compares.
For example:
file1 has a list of user ids (about 900) from the company's e-mail server.
file2 has a list of user ids (about 50 or so) from... (7 Replies)
Discussion started by: muzica
7 Replies
2. Shell Programming and Scripting
Hello,
I'm currently messing around with arrays for the first time in scripting (Unix Korn Shell). All I'm trying to do right now before I make things complicated is read through and print out to screen whether the read file is or is not a directory.
Here is my directory:
ls -l
total... (5 Replies)
Discussion started by: Janus
5 Replies
3. Shell Programming and Scripting
When I run this, it tests to Y, but why? If I take the double quotes off of test, i get the same.
# !/bin/ksh
TEST="N"
if ; then
echo $TEST" yes"
else
echo "no"
fi (4 Replies)
Discussion started by: guessingo
4 Replies
4. Shell Programming and Scripting
Hello All,
I have another Korn shell question. I am writing a script that will ftp a file from my production database to my test database.
To this, I have to construct a loop that checks a specified folder for a file.
If the file exists, I want it execute the ftp protocol and then exit. ... (2 Replies)
Discussion started by: jonesdk5
2 Replies
5. Shell Programming and Scripting
I've been reading the O'Reilley expect book and I'm trying to create partial automation for common questions asked on screen in a telnet session and return to interact so the user can resume control.
For example
while {1} {
expect {
-re "What color is the sky?" {send... (0 Replies)
Discussion started by: mlarivie
0 Replies
6. Shell Programming and Scripting
Hi
First of all I tried lot of forums to create my first expect script. But I am totally stumped at the last step. I am no Linux Admin or ever trained in Linux. I just tried to create the script logically
History :
I need to to change my password across lot of servers in Linux over ssh
... (4 Replies)
Discussion started by: radioactive9
4 Replies
7. Shell Programming and Scripting
Hi,
I am trying to incorporate multiple while loops into an expect script written in ksh shell. This is on a Solaris 10 system. Here is the code:
#!/bin/ksh
EXPECT=/usr/local/bin/expect
exp_internal
i=1
h=0
while ]; do
$EXPECT << DONE
set stty_init raw
... (1 Reply)
Discussion started by: cic
1 Replies
8. Shell Programming and Scripting
Hi i have to cut columns 2 to 6 from a file and assign it to arrays ,
The following code works
for ctcol in 2 3 4 5 6;
do
set -A a$ctcol $(cut -d, -f $ctcol test_file)
done
how ever this does not work
for ctcol in {2..6};
do
set -A a$ctcol $(cut -d, -f $ctcol test_file)... (4 Replies)
Discussion started by: 100bees
4 Replies
9. Shell Programming and Scripting
Hi,
I am facing an issue wherein some temporary files (here docs) are getting created in /tmp and are not getting deleted automatically.
When i check the list of open files with below command i can see one file is getting appended continuously.(In this case /tmp/sfe7h.34p)
The output is... (4 Replies)
Discussion started by: Navin_Ramdhami
4 Replies
10. Shell Programming and Scripting
Hello,
When I run below script, everything is okay:
#!/bin/bash
wget --user-agent="Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0 referer" \
"http://xx.yy.zz/something" -O downloaded_file
while read c1
do
... (6 Replies)
Discussion started by: baris35
6 Replies
LEARN ABOUT OPENSOLARIS
times
times(3UCB) SunOS/BSD Compatibility Library Functions times(3UCB)
NAME
times - get process times
SYNOPSIS
/usr/ucb/cc [ flag ... ] file ...
#include <sys/param.h>
#include <sys/types.h>
#include <sys/times.h>
int times(tmsp)
register struct tms *tmsp;
DESCRIPTION
The times() function returns time-accounting information for the current process and for the terminated child processes of the current
process. All times are reported in clock ticks. The number of clock ticks per second is defined by the variable CLK_TCK, found in the
header <limits.h>.
A structure with the following members is returned by times():
time_t tms_utime; /* user time */
time_t tms_stime; /* system time */
time_t tms_cutime; /* user time, children */
time_t tms_cstime; /* system time, children */
The children's times are the sum of the children's process times and their children's times.
RETURN VALUES
Upon successful completion, times() returns 0. Otherwise, it returns -1.
SEE ALSO
cc(1B), time(1), time(2), getrusage(3C), wait(3C)
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-threaded applications is unsupported.
The times() function has been superseded by getrusage(3C).
SunOS 5.11 30 Oct 2007 times(3UCB)