03-11-2015
First you need to precisely define "done". Then how do you handle error conditions?
And you need to take into account the only entity that knows for certain that the file is "done" - and correct - is whatever is writing it.
Even checking if a process has the file open isn't going to tell you the file is "done" with certainty - that ignores error conditions, such as when a network connection fails.
This User Gave Thanks to achenle For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Forgive the daft requests - I'm still a learner :D
I need a script so that I can test another script (I'm confused already) The script I am looking for should generate a new file in the same directory (called newfile1 or what ever) and also generate text within the new file (Hello world? What... (1 Reply)
Discussion started by: JayC89
1 Replies
2. Shell Programming and Scripting
I am trying to find for the pattern in first 5 bytes of every line in a text file and then generate a new file with the pattern found.
Example: expected pattern is '-' to be serached in first 5 bytes of file only.
Input File
ab-cd jan-09
ddddd jan09
cc-ww jan09
dsgdq jan-09
... (2 Replies)
Discussion started by: net
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Our requirement is we have to create file from one file where all the rows from source file is converted into columns of the target file.
For example
Source file is :
Status Report ABC
Generated: 2009-05-05 08:49:47
Job start time=2009-05-05 08:43:43
Job end time=2009-05-05... (1 Reply)
Discussion started by: Amey Joshi
1 Replies
4. Shell Programming and Scripting
Hello Gurus,
We are facing some performance issue in UNIX. If someone had faced such kind of issue in past please provide your suggestions on this .
Problem Definition:
/Few of load processes of our Finance Application are facing issue in UNIX when they uses a shell script having below... (19 Replies)
Discussion started by: KRAMA
19 Replies
5. Emergency UNIX and Linux Support
Hi Gurus,
I have a requirement as below
I have text file a.txt which contains
hi hello
process update
status
Output for file Ok to Proceed no issues good
data arrangement
My requirement here is i need to read the file and check for the words
"OK to Proceed" and if it is available... (14 Replies)
Discussion started by: pssandeep
14 Replies
6. UNIX for Dummies Questions & Answers
HI,
I want to append some configuration statements to the existing file in unix to it's 3 line , 7th line and 28 line.
There is a file generated by our system job, to this I need to add some lines as mentioned below.
DIR=/usr/CDR - line 3
Source=/usr/src - line 7
Target=/usr/tgt - line... (2 Replies)
Discussion started by: mora
2 Replies
7. Shell Programming and Scripting
Hi Frndz,
I have req in which i need to run the query stored in some file and then store the resultset of the query in some other file.
PFB the code i have written:
#----Start job log---
SQLLOG='/opt/app/vertica2/cdr_dev/logs/conn_orac_db.log'
ORA_USER='abc'
ORA_PASSWD='xyz'
... (7 Replies)
Discussion started by: gnnsprapa
7 Replies
8. UNIX for Dummies Questions & Answers
Hi Guys,
I have a simple request. I have a file in w3c format. Each file has 2 header lines. Rest of the lines are 16 columns each. They are separated by Tab. I need to discard the first 2 lines and then write each column of the txt file into a seperate column of CSV. I tried the command below... (1 Reply)
Discussion started by: tinkugadu
1 Replies
9. Shell Programming and Scripting
i have a unix script which generates the csv file. the data in csv file is dynamic. how can i convert/move the data from csv file to xml. please suggest (1 Reply)
Discussion started by: archana25
1 Replies
10. Shell Programming and Scripting
Hi All
Below code is working as expected but creating too many child processes when the url is not up and every minute that process is sending false email alerts
any help with the logic not to generate child process and not to send duplicate alerts
app="https://url"
appresult=$(wget... (2 Replies)
Discussion started by: srilinux09
2 Replies
LEARN ABOUT OSF1
fdatasync
fdatasync(2) System Calls Manual fdatasync(2)
NAME
fdatasync - Writes data changes in a file to permanent storage
SYNOPSIS
#include <unistd.h>
int fdatasync ( int fildes );
PARAMETERS
Specifies a valid open file descriptor.
DESCRIPTION
The fdatasync function causes system buffers containing a file's modified data to be written to permanent storage. The fdatasync function
does not return until the operation has been completed. The fdatasync function provides data integrity, ensuring that data in permanent
storage is identical to data in the buffer. However, use of fdatasync does not guarantee that file control information such as owner and
modification time has been updated to permanent storage (see the fsync function).
NOTES
The file identified by the fildes parameter must be open for writing when the fdatasync function is issued or the call will fail.
RETURN VALUES
Upon successful completion, the fdatasync function returns a value of 0 (zero). If the fdatasync function fails, a value of -1 is returned
and errno is set to indicate the error. If fdatasync fails, outstanding I/O operations are not guaranteed to have been completed.
ERRORS
If the fdatasync function fails, errno may be set to one of the following values:
[EBADF] The fildes parameter is not a valid file descriptor.
[EINVAL] The fildes parameter does not refer to a file on which this operation is possible.
If any queued I/O operations fail, the fdatasync function returns error conditions defined for the read and write functions.
RELATED INFORMATION
Functions: fcntl(2), fsync(2), open(2), read(2), sync(2), write(2) delim off
fdatasync(2)