06-28-2006
Cheers grial almost there only problem keeps reverting to $val to 0
I need to keep a record of the last value and use this the next time the process is ran
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I hav two files a1.txt and a2.txt,
a1.txt contains:
---------------
asdev ebcdev ....
a2.txt contains:
---------------
asdev ebcdev prod ....
a1.txt will be updated by a process,..
now i want to compare two files and i want to see data which is not in a1.txt
am i clear....??
... (3 Replies)
Discussion started by: rrs
3 Replies
2. Shell Programming and Scripting
File 1 data:
TestA
TestB
TestC
File 2 data:
TestA
TestD
TestE
My Output File (pick all from both and create a file without duplicate data)
----------------------------------------------------------------------
TestA
TestB
TestC (3 Replies)
Discussion started by: manmohanpv
3 Replies
3. Shell Programming and Scripting
Hi,
I have two files, in which the second file has exactly the same contents of the first file with some additional records. Now, if I want to remove those matching lines from file2 and print only the extra contents which the first file does not have, I could use the below unsophisticated... (3 Replies)
Discussion started by: royalibrahim
3 Replies
4. Shell Programming and Scripting
Hello Everybody!
My question is how can I mix for example file_a with file_b in the following method:
After 2 lines of file_a put 2 lines from file_b to file_c.
For example:
file_a:
1
2
3
4
5
6
file_b:
11
22 (7 Replies)
Discussion started by: Levi85
7 Replies
5. UNIX for Advanced & Expert Users
Hi Guys ,
we have one directory ...in that directory all files will be set on each day..
files must have header ,contents ,footer..
i wants to compare the header,contents,footer ..if its same means display an error message as 'files contents same' (7 Replies)
Discussion started by: Venkatesh1
7 Replies
6. Shell Programming and Scripting
Hey guys,
need help with a script I'm trying to write.
Basically I need to compare the contents of a folder called "profiles"
with a list of files called "template".
when the file matches the contents of the folder it needs to set a variable called "checked" to "1"
Cookies to anyone... (4 Replies)
Discussion started by: Scriporium
4 Replies
7. Shell Programming and Scripting
Hi,
I want to compare two files based on the data in their first column. Both the files are not equal in their number of columns and number of entries or rows.
The entries (only the first column) of the file1 should be compared with the entries (only the first column) of the file2. If the... (3 Replies)
Discussion started by: begin_shell
3 Replies
8. Shell Programming and Scripting
Hi
i need Script to copy the contents of two files into one file
i have 2 fil X1.txt / X2.txt i need script to copy the contents of X1 and X2 In AllXfile
X1.txt
File X1
X2.txt
File X2
AllXfile.txt
File X1
File X2 (2 Replies)
Discussion started by: azzeddine2005
2 Replies
9. Shell Programming and Scripting
I have a script that outputs a file in the below format
group1:user1,user2,user3, user4
group2:user2, user4, user5
group3: user1, user6, user7
If there is a change in /etc/passwd with addition/deletion of users, then the next run of the script will output the file with the changes.
How... (3 Replies)
Discussion started by: Newbie2015
3 Replies
10. UNIX for Beginners Questions & Answers
I am trying to consolidate multiple information files (<hostname>.Linux.nfslist) into one file so that I can import it into Excel. I can get the file contents with cat *Linux.nfslist >> nfslist.txt. I need each line prefaced with the hostname. I am unsure how to do this.
--- Post updated at... (5 Replies)
Discussion started by: Kentlee65
5 Replies
LEARN ABOUT OSF1
reltimer
reltimer(3) Library Functions Manual reltimer(3)
NAME
reltimer - Establishes timeout intervals of a per-process timer
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <sys/timers.h>
int reltimer( timer_t tmrid, struct itimerspec *val, struct itimerspec *oval) ;
PARAMETERS
Specifies the per-process timer to access. Points to a type itimerspec structure containing the values of the initial and offset timeout
intervals. Points to a type itimerspec structure where the current value of the timer timeout interval and the time-to-go are to be
stored.
DESCRIPTION
The reltimer() function establishes initial and offset timeout intervals of a per-process timer specified by the tmrid parameter. Initial
and offset timeout interval information is stored in an itimerspec structure pointed to by the val parameter. When the per-process timer
specified by the tmrid parameter is active, after timeout of the initial time interval, all subsequent timeouts are controlled by the off-
set timeout value; as long as tmrid continues to operate, the offset values pointed to by the val parameter are used as the per-process
timeout interval. The current timeout interval and the time-to-go are returned to the location pointed to by the oval parameter.
Initial and offset time information for the per-process timer is stored in space reserved by a type itimerspec structure pointed to by the
val parameter. A type itimerspec structure is also used to store returned time information specified by the oval parameter. The itimerspec
structure is defined in the sys/timers.h include file.
NOTES
Time values smaller than the resolution of the specified timer are rounded up to the resolution value. Time values larger than the maximum
timeout value of the specified per-process timer are rounded down to that maximum value. Trial use
RETURN VALUES
Upon successful completion, the reltimer() function returns 0 (zero). Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
If the reltimer() function fails, errno may be set to the following value: The timerid parameter does not specify an allocated per-process
timer, or the val parameter points to a nanosecond value less than zero or greater than or equal to 1000 million.
RELATED INFORMATION
Functions: alarm(3), getclock(3), gettimer(3), mktimer(3) delim off
reltimer(3)