Some how the open(file,flag, acc) returns 0 and write to the screen, instead of the file ???
I am out of idea what to do to resolve the problem!
I need to use the open(file, for.., access) function to write a file.
Never have the situation like that: it is return 0 - zero.
As a result all write(..) going to the screen!
What the problem it could be?
I do not even know what to show in code.
Opened this way:
The 'rpt_fl' is fine
prints out:
and
I undestand that the system by default should have the '0' descriptor associated with the standart output and have it unavailable (or already assighned) on any, even first a file descriptor request (by the open(..),) but it is not happening in my case.
I am stucked with how get it resolve.
What could be the reason for such behavior?
What would you advise to do to realise the problem or correct it?
I have to check a directory on Linux (via shell Script which I am trying to build) for about 20 different source files with file patterns and if the files are made available in the directory, I should place flag files for which my other ETL jobs are waiting on to kick off. If the source files are... (6 Replies)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
I am using xlC (Version: 11.01.0000.0011).
While build i am using "-g" to have debug information in build.
there are many object files (>500) due to which resultant shared file (.so) will have huge size.
I can't reduce optimization level.
Is there any way or flag is present by using which i... (2 Replies)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
Hi
want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris.
Purpose : while running perf. test, needs to find where is the bottleneck.
We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Hi,
I need a unix shell script for this requirement and is URGENT
My input text file contains
A-1
B-1
C-1
D-2
E-2
F-3
G-3
H-3
I-3
J-4
K-4
L-5
My expected result should be:
if flag is 1, it has to delete A, B, C
if flag is 2, it has to delete D,E
if flag is 3, it has to delete... (1 Reply)
We've just moved to a new iTanium development system at my place of business, as the previous one is going to be diverted to other uses. Our product uses a locally produced library built from over 2,300 C++ sources.
We just noticed that our libraries are 2/3s smaller on the new system than they... (1 Reply)
a.ksh & b.ksh run at the same time and takes huge resource and time.I want to put a technique so that one wil run after another.
eg put a flag so that each script will check if it running , then sleep and wait it to finish.
Can some one advise (3 Replies)