I will assume that you already made a pipe file with something like mknod /$PIPEDIR/nvpipe p however I would be concerned that you have no idea which thread is reading the (now) input at any time.
You might find that the first reading process locks up the pipe, I'm not sure. It might be more sensible to ignore the pipe altogether and do something more like this:-
Split metadata.csv into 30 roughly equal files
Fire off 30 processes that read a separate input file each to do whatever processing you need
If you can get the number of lines in your file, you should be able to get the require line-count like this:-
It's untested, but does it get you started a bit better?
Probably there are better ways to do this in a single awk. What does your prg1.sh & prg2.sh actually do?
Hi
I have apeculiar problem with sockets.
I have a shared object for my client program.
when I send a request to the server, it is suppose to process and sends back the result string to the client.
For the first request, it is working fine i.e. client sends the req. and gets the... (1 Reply)
Hi,
I am trying to test the exit status of the cleartool lsvtree statement below, but it doesn't seem to be working due to the tail pipe, which it is testing instead. Is there a way around this without adding a tonne of new code?
cleartool lsvtree $testlocation/$exe_name | tail -15
... (10 Replies)
I have a question about how to get the exit code of the first command when it appears in a pipe-lined command.
For example, I have the following script:
grep abc dddd | tee -a log
if ]
then
echo "ERROR!"
fi
In the above script, ] is supposed to test the exit code of "grep abc... (3 Replies)
Hi all,
Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this?
Your help is greatly appreciated!!
Best Regards,
Naveen. (1 Reply)
Hi,
If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script.
dd bs=1024 count=3 if=/src of=/dest
But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Guys, I have a problem :confused: and I need some help:
I've to process many huge zip files.
I'd code an application that receive the data from a pipe, so I can simple unzip the data and send it (via pipe) to my app.
Something like that:
gzip -dc <file> | app
The problem is: How can I... (7 Replies)
Hello guys. I really hope someone will help me with this one..
So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will... (1 Reply)
hello,
suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly.
example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly.
enter your name:
donald duck (this is of 11 bytes)
expected is as below - display 11... (3 Replies)
Hi expert,
How do i exit to while read, below is the script.
I need to exit after execute echo or command.
or any scripts that can search two patterns and if they found any patterns execute the command and exit.
Thanks a lot..
tail -fn0 /tmp/test.log | \
while read line ; do
... (12 Replies)
I have created a fifo named pipe in solaris, which writes the content of a file, line by line, into pipe as below:
$ mkfifo namepipe
$ cat books.txt
"how to write unix code"
"how to write oracle code"
$ cat books.txt >> namepipe &
I have a readpipe.sh script which reads the named... (2 Replies)
Discussion started by: naveen mani
2 Replies
LEARN ABOUT CENTOS
cache_repair
CACHE_REPAIR(8) System Manager's Manual CACHE_REPAIR(8)NAME
cache_repair - repair cache binary metadata from device/file to device/file
SYNOPSIS
cache_repair [options] -i {device|file} -o {device|file}
DESCRIPTION
cache_repair reads binary cache metadata created by the respective device-mapper target from one device or file , repairs it and writes it
to another device or file. If written to a metadata device , the metadata can be processed by the device-mapper target.
-i, --input {device|file}
Input file or device with binary metadata.
-o, --output {device|file}
Output file or device for repaired binary metadata.
-h, --help
Print help and exit.
-V, --version
Output version information and exit.
EXAMPLE
Reads the binary cache metadata from file metadata , repairs it and writes it to logical volume /dev/vg/metadata for further processing by
the respective device-mapper target:
cache_repair -i metadata -o /dev/vg/metadata
DIAGNOSTICS
cache_repair returns an exit code of 0 for success or 1 for error.
SEE ALSO cache_dump(8)cache_check(8)cache_restore(8)AUTHOR
Joe Thornber <ejt@redhat.com>
Heinz Mauelshagen <HeinzM@RedHat.com>
Red Hat, Inc. Thin Provisioning Tools CACHE_REPAIR(8)