03-08-2010
Quote:
Originally Posted by
Corona688
...
I think the result of the == is being assigned to fdRPT.
It appsolutely right!!!
Thank you very much!!!
Now it works as expected!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: konark
3 Replies
2. HP-UX
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)
Discussion started by: Mark F. Cook
1 Replies
3. Shell Programming and Scripting
my script has some print statement i want to display it on screen and at same time i want to redirect it into some log file. (2 Replies)
Discussion started by: RahulJoshi
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: moses_a
1 Replies
5. Solaris
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)
Discussion started by: raxitsheth
1 Replies
6. Solaris
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)
Discussion started by: kchinnam
12 Replies
7. Shell Programming and Scripting
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)
Discussion started by: asnandhakumar
6 Replies
8. AIX
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)
Discussion started by: Abhi04
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: Divya Nochiyil
10 Replies
10. Shell Programming and Scripting
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)
Discussion started by: dhruuv369
6 Replies
LEARN ABOUT FREEBSD
g_access
G_ACCESS(9) BSD Kernel Developer's Manual G_ACCESS(9)
NAME
g_access -- control access to GEOM consumers and their providers
SYNOPSIS
#include <geom/geom.h>
int
g_access(struct g_consumer *cp, int dcr, int dcw, int dce);
DESCRIPTION
The g_access() function allows to open, close, and generally change access to the provider which is attached to the given consumer cp. The
arguments dcr, dcw, and dce represent relative read, write, and exclusive access count changes. Read and write access counts are self
explanatory, and exclusive access counts deny write access to other interested parties. A provider's access count is the sum of the access
counts of all attached consumers.
After attaching a consumer to a provider with g_attach(9), the g_access() function has to be called on the consumer before starting I/O
requests.
RESTRICTIONS
/CONDITIONS
The consumer has to be attached to a provider.
The intended change must not result in a negative access count.
No-operation is not permitted (dcr = dcw = dce = 0).
The provider's geom must have an access method defined (e.g., gp->access).
The topology lock has to be held.
RETURN VALUES
The g_access() function returns 0 if successful; otherwise an error code is returned. Note that g_access() cannot fail when the arguments
dcr, dcw, and dce are less than or equal to 0.
EXAMPLES
Create a consumer, attach it to a given provider, gain read access and read first sector.
void
some_function(struct g_geom *mygeom, struct g_provider *pp)
{
struct g_consumer *cp;
void *ptr;
int error;
g_topology_assert();
/* Create new consumer on 'mygeom' geom. */
cp = g_new_consumer(mygeom);
/* Attach newly created consumer to given provider. */
if (g_attach(cp, pp) != 0) {
g_destroy_consumer(cp);
return;
}
/* Open provider for reading through our consumer. */
error = g_access(cp, 1, 0, 0);
if (error != 0) {
printf("Cannot access provider: %s
", error);
g_detach(cp);
g_destroy_consumer(cp);
return;
}
/*
* Don't hold topology lock while reading.
*/
g_topology_unlock();
ptr = g_read_data(cp, 0, pp->sectorsize, &error);
if (ptr == NULL)
printf("Error while reading: %d
", error);
/*
* Do something useful with data.
*/
g_topology_lock();
/* Disconnect from provider (release access count). */
g_access(cp, -1, 0, 0);
/* Detach from provider. */
g_detach(cp);
/* Destroy consumer. */
g_destroy_consumer(cp);
}
ERRORS
Possible errors:
[EPERM] The function is trying to open a provider with an exclusive access count, but it is already open for writing.
[EPERM] The function is trying to open a provider for writing, but it is already exclusively open.
Any other error that can be returned by the provider's access method.
SEE ALSO
geom(4), DECLARE_GEOM_CLASS(9), g_attach(9), g_bio(9), g_consumer(9), g_data(9), g_event(9), g_geom(9), g_provider(9), g_provider_by_name(9),
g_wither_geom(9)
AUTHORS
This manual page was written by Pawel Jakub Dawidek <pjd@FreeBSD.org>.
BSD
January 16, 2004 BSD