06-02-2008
Thanks the code is executing fine according to my needs.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am having trouble through, I am reading the input from tab delimited file containing several records,
e.g.
line1 field1 field2 field3 so on..
line2 field1 field2 field3 so on..
..
..
on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies
2. Shell Programming and Scripting
There is one Text file data.txt.
Data within this file looks like:
a.sql
b.sql
c.sql
d.sql
.....
.....
want to write a shell script which will access these values within a loop, access one value at a time and store into a variable. can anyone plz help me. (2 Replies)
Discussion started by: Dip
2 Replies
3. Shell Programming and Scripting
Hi All,
Please help me in writing data to a file in one row.
In database there is a column which contains large data which does not fit in the file in one row. The column contains list of paths. I want to write these paths to a file in one row.
Please find the code below writes :
... (2 Replies)
Discussion started by: rajeshorpu
2 Replies
4. Shell Programming and Scripting
I was trying to store the number of lines in a file and store it in a file.after that i want to store the information in a file to a variable which is further used in the if loop to check certain condition.
#!/bin/bash
cat <file> | wc -l > count.txt
x="$count.txt";
i=10;
if ; then
cat... (10 Replies)
Discussion started by: sudhakaryadav
10 Replies
5. Shell Programming and Scripting
Hi, I am writting some perl scripts for daily backup process. In which I want to pass some data/referance from another txt file. Text file contains only one column and multiple rows. I want to pass this data to variables of another perl script.
e.g.
Refdoc.txt file contains data as:
perl1... (3 Replies)
Discussion started by: n.dba
3 Replies
6. Shell Programming and Scripting
Hi,
I have below type of data in a text file in unix.
Emp_Name Emp_Dept
Raj 101
Amruta 100
Shilpa 100
Rohit 123
Amol 198
Rosh 101
Gaurav 198
Number of employees can be even more.
Need a command or a... (2 Replies)
Discussion started by: rajneesh_kapoor
2 Replies
7. Shell Programming and Scripting
I have a requirement to read the xml file and split the files into two diffrent files in Unix shell script. Could anyone please help me out with this requirement.
Sample file
---------------
0,<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Information... (3 Replies)
Discussion started by: kmanivan82
3 Replies
8. Shell Programming and Scripting
I need some help with this code below, i doesnt know why it will run twice with my function, but my function only got if else, any other way that can read line and put into array?
while read line; do
read -A array <<<$line
n=${#array}
for ((i=1;i<$n;i++)); do
print... (1 Reply)
Discussion started by: gavin_L
1 Replies
9. Shell Programming and Scripting
I have a file as below. It contains two data sets separated by >.
I want to pipe each data set to another program called psxy. How
can I get the different records
Have started doing as follows but it only passes the first data set
awk 'BEGIN {RS=">"};{print $0}' p.dat
cat p.dat... (12 Replies)
Discussion started by: kristinu
12 Replies
LEARN ABOUT HPUX
clock_getres
clocks(2) System Calls Manual clocks(2)
NAME
clock_settime(), clock_gettime(), clock_getres() - clock operations
SYNOPSIS
DESCRIPTION
clock_settime()
The function sets the specified clock, to the value specified by Time values that are between two consecutive non-negative integer multi-
ples of the resolution of the specified clock are truncated down to the smaller multiple of the resolution.
clock_gettime()
The function returns the current value for the specified clock,
clock_getres()
The resolution of any clock can be obtained by calling Clock resolutions are implementation defined and are not settable by a process. If
the argument is not NULL, the resolution of the specified clock is stored into the location pointed to by If is NULL, the clock resolution
is not returned.
A clock may be system wide, that is, visible to all processes; or per-process, measuring time that is meaningful only within a process.
The following clocks are supported:
This clock represents the realtime clock for the system.
For this clock, the values returned by and specified by represent the amount of time (in seconds and nanoseconds) since
the Epoch. It is a system wide clock. The privilege is required to set this clock. Processes owned by the superuser
have this privilege. Processes owned by other users may have this privilege, depending on system configuration. See
privileges(5) for more information about privileged access on systems that support fine-grained privileges.
This clock represents the amount of time (in seconds and nanoseconds)
that the calling process has spent executing code in the user's context. It is a per-process clock. It cannot be set
by the user.
This clock represents the amount of time (in seconds and nanoseconds)
that the calling process has spent executing code in both the user's context and in the operating system on behalf of
the calling process. It is a per-process clock. It cannot be set by the user.
These clocks are high resolution hardware clocks
present on HP-RT realtime systems. It is included here so that applications accessing this hardware can be compiled on
HP-UX systems and then ported to an HP-RT target. HP-UX does not support or
RETURN VALUE
A return of zero indicates that the call succeeded. A return value of -1 indicates that an error occurred, and is set to indicate the
error.
ERRORS
If any of the following conditions occur, the and functions return -1 and set (see errno(2)) to the corresponding value:
The functions
and are not supported by this implementation.
The argument does not specify a known clock.
The argument to is outside the range for the given
The argument specified a nanosecond value less than zero or greater than or equal to 1000 million.
The requesting process does not have the necessary privileges to set the
specified clock.
The or argument points to an invalid address.
EXAMPLES
Advance the system wide realtime clock approximately one hour:
Get the resolution of the user profiling clock:
AUTHOR
and were derived from the proposed IEEE POSIX P1003.4 Standard, Draft 14.
SEE ALSO
timers(2), privileges(5).
STANDARDS CONFORMANCE
clocks(2)