04-04-2009
pipe report output to another server
I have access to an AIX 5.3 box, where I need to write a report to:
/tmp/report
The report is larger then the amount of available disk space on the box.
There's about 1 GB of free space, for a 1.5 GB report.
The report is destined for another box (10.0.0.2) anyway, which has enough free space.
This report gets run weekly. Currently we have to split the report into chunks and transfer the parts separately.
What I'm thinking might be an option is to create a named pipe to send the report to the other box using ftp or scp (or curl if I have to but its not currently installed).
What I'm not sure about is how to do this:
Create /tmp/report before I run the report as some type of named pipe that directs to:
|scp user@10.0.0.2:/lots_of_space/report
then have the app write the report to /tmp/report, where the pipe send it to my other box. I'm also not sure if the app writing the report will just try to over write the file/pipe at /tmp/report instead of piping it.
I pretty familiar with unix, but I haven't done much in the lines of named pipes or piping across the network.
Thanks in advance for any help!
10 More Discussions You Might Find Interesting
1. Programming
i am new to linux programming. can anyone answer my question?
there is one pipe file "my_pipe"
prw-r--r-- 1 john rnd 32 Aug 17 19:45 my_pipe
how to output string message (char*) to this pipe? which API should I use? (3 Replies)
Discussion started by: princelinux
3 Replies
2. Shell Programming and Scripting
anybody can help, plz:
I want to pass the output of "ls" to "grep":
ftp -n host <<!
USER user passwd
ls
bye
! | grep file
exit 0
It does not work!!
Any idea??
Sami (7 Replies)
Discussion started by: sami98
7 Replies
3. UNIX for Dummies Questions & Answers
I am using grep and I want the output to go into two files without going to the screen. I used tee to get the output into two files, but it is also putting the output on the screen which i do not want. Can this be fixed. (2 Replies)
Discussion started by: NobluesFDT
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am having a list of directories with different login id's. My requirement is that i need to list the directories of my id and need to delete them. So i am using following code
ls -ltr ¦ grep userid ¦ rm -rf
But this is not working. So is there any way of doing it. Please note... (3 Replies)
Discussion started by: sarbjit
3 Replies
5. UNIX for Dummies Questions & Answers
I can use pipe output to a file. For example
./somescript.sh > output.txt
But for example if the output from ./somescript.sh is slow. like if it prints one line every minute then output.txt is not updated every minute. Lines are written to output.txt in one go, hence have to wait for the whole... (2 Replies)
Discussion started by: kevincobain2000
2 Replies
6. UNIX for Dummies Questions & Answers
I have a script that finds all sffs and extracts them into .fastq file types. What I need to do is change the .fastq to .fasta using the below script. How can I change the input.fastq and output.fasta to mirror the file's name? Would I use an array and use the default iterator?
#!/bin/bash
... (3 Replies)
Discussion started by: jrymer
3 Replies
7. Shell Programming and Scripting
Hi All,
i have the following command
df|awk '{print $5}'|grep /| egrep -v '^/$|/usr|/opt|/var/log|/home|/tmp'
output looks like:
/filesystem/number1
/filesystem/number2
/filesystem3
/possiblymoreoutput
i want the output to look like the below (either in a file or to output to... (3 Replies)
Discussion started by: Tommyk
3 Replies
8. Shell Programming and Scripting
I'd like to have the output from this script piped to a text file that has the date at the beginning of it. For example, my ideal would be something like this
$./run_script.sh
$ls *.out
2013-Feb-26-output_filename.out
Here's the code I'm using.
#! /bin/ksh
DAT=`date '+%Y-%b-%d'`
for... (2 Replies)
Discussion started by: DustinT
2 Replies
9. Shell Programming and Scripting
I'm trying to get an output to echo on the next line in a given color and outputted next to a label.
Sorry if that's a bit vague, see below.
#!/bin/bash
YELLOW=$(tput setaf 3 && tput bold)
echo -n 'plaintext' | openssl md2 || read hash
echo "$YELLOW Hash:$hash"
But I can't seem to get the... (2 Replies)
Discussion started by: 3therk1ll
2 Replies
10. Shell Programming and Scripting
Hi,
I am trying to search for a string in a file and print all the matched lines as pipe delimited format.
My command is
cat m_gid_trans.XML|grep -i '<TABLEATTRIBUTE NAME ="Lookup cache directory name"'
The output I am getting is
<TABLEATTRIBUTE NAME ="Lookup cache directory name"... (4 Replies)
Discussion started by: sampoorna
4 Replies
UHID(4) BSD Kernel Interfaces Manual UHID(4)
NAME
uhid -- USB generic HID support
SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file:
device uhid
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
uhid_load="YES"
DESCRIPTION
The uhid driver provides support for all HID (Human Interface Device) interfaces in USB devices that do not have a special driver.
The device handles the following ioctl(2) calls:
USB_GET_REPORT_ID (int)
Get the report identifier used by this HID report.
USB_GET_REPORT_DESC (struct usb_ctl_report_desc)
Get the HID report descriptor. Using this descriptor the exact layout and meaning of data to/from the device can be found. The
report descriptor is delivered without any processing.
struct usb_ctl_report_desc {
int ucrd_size;
u_char ucrd_data[1024]; /* filled data size will vary */
};
USB_SET_IMMED (int)
Sets the device in a mode where each read(2) will return the current value of the input report. Normally a read(2) will only return
the data that the device reports on its interrupt pipe. This call may fail if the device does not support this feature.
USB_GET_REPORT (struct usb_ctl_report)
Get a report from the device without waiting for data on the interrupt pipe. The report field indicates which report is requested.
It should be UHID_INPUT_REPORT, UHID_OUTPUT_REPORT, or UHID_FEATURE_REPORT. This call may fail if the device does not support this
feature.
struct usb_ctl_report {
int ucr_report;
u_char ucr_data[1024]; /* used data size will vary */
};
USB_SET_REPORT (struct usb_ctl_report)
Set a report in the device. The report field indicates which report is to be set. It should be UHID_INPUT_REPORT,
UHID_OUTPUT_REPORT, or UHID_FEATURE_REPORT. This call may fail if the device does not support this feature.
Use read(2) to get data from the device. Data should be read in chunks of the size prescribed by the report descriptor.
Use write(2) to send data to the device. Data should be written in chunks of the size prescribed by the report descriptor.
FILES
/dev/uhid?
SEE ALSO
usbhidctl(1), usb(4)
HISTORY
The uhid driver appeared in NetBSD 1.4. This manual page was adopted from NetBSD by Tom Rhodes <trhodes@FreeBSD.org> in April 2002.
BSD
November 22, 2006 BSD