a) Have to check the previous counter value in the file.
b) After some processess are runned again i have to check the same counter value in the same file.
Here is the file contents.
Here is the code.
Some other process will run and the file.txt gets changed to the new value.
Now contents of file are:
The Output should be:
I am having the problem here because when the program is run the file.txt contents is replaced again the previous and new value will be 1.
How can i check the previous and new value of counter in the file?
Should i use the same code for new and previous values?
How do i get the above output?
Regards
vanitha
Last edited by Franklin52; 06-30-2010 at 08:38 AM..
Reason: correcting code tags
Seems like a pretty straightforward case. You have the script X to capture the "Counter Value" from the file.
1) Run the script X and capture the (old) "Counter Value".
2) Run the processes that update your file.
3) Run the script X again, and capture the (new) "Counter Value".
Seems like a pretty straightforward case. You have the script X to capture the "Counter Value" from the file.
1) Run the script X and capture the (old) "Counter Value".
2) Run the processes that update your file.
3) Run the script X again, and capture the (new) "Counter Value".
tyler_durden
Hi,
Thanks for your mail.
The code above posted can i use that.
But the file when reopen is giving new as well as old value same.
Hi,
I have an xml file like this: I am using xml::dom also and libxml.
<Nodes>
<Node>
<NodeName>MainContent</NodeName>
<data>1.csv</data>
<Node>
<NodeName>Status</NodeName>
<IsWrapper/>
... (3 Replies)
Hi,
I have two problems in which i have stuck up.
a) To move the files and copy back.
b) To create user dynamically.
Question 1:
I have to move the files to some other directory and copy it when all the process is done.
I have the code like this:
$file = "/home/data/file1.txt";... (2 Replies)
Hi,
I have one file name file.txt
It has the following contents:
#File Contents
StartTime,EndTime,COUNTER1,COUNTER2,COUNTER3
12:13,12:14,0,1,0
The output should be like this:
StartTime: 12:13
ENDTIME: 12:14 (2 Replies)
Hi, i suddenly realized that a directory is deleted unfortunately there are many user have pervilages on this directory
is there a way to track the user who delete this directory
or atleast from now can i enable something so that i can track from now
I think there is way from... (2 Replies)
dear all ,
I m new to shell programming and I need your help.
Actually i want to keep track of all the commands executed in a bash prompt of users ,
very much in same manner as it is displayed when we run "history" command.
now the users are smart enough as they delete their history by... (6 Replies)
Like the topic says, does anyone know if it is possible to check to see when an FTP only user has logged in? Because the shell is /bin/false and they are only using FTP to access the system doing a "finger" or "last" it says they have never logged in.
Is there a way to see when ftp users log in... (1 Reply)
hello
I have loop , in this loop im picking names , this names I want to be keys in %hash
but I don't know how to set in every loop entertain different key in the %hash (1 Reply)
All,
Is there any command or method by which we can track changes in a file in Unix (Something similar to track changes in a word document).
I know there is CVS which is used to store code changes and track changes in the code. But other than CVS any way to find out changes done in a file... (1 Reply)
We just went from HP-UX 10.20 to 11.00.
All the bugs are out, except for a small detail...the old 9-track isn't working.
We receive large amounts of data on reel-to-reel so I kinda need it fixed. In the meantime, I'm trying to see if they can send me a DAT tape instead.
I'm pretty sure the drive... (8 Replies)