pipe and stdout


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers pipe and stdout
# 1  
Old 01-31-2004
gbak question

Hi there
I know that this isn't the place to put a question like this i supose, but i'm geting desperated. I have searched in interbase forums and nothing helped. If anyone can help me i would apreciated.
I'm using HP-UX with a version 3 of interbase wich means i can't split the backup file into several more. Since i'm trying to backup a database wich have about 6GB, i need to automate the process and make gbak split the files with size lower than 2GB.

I was trying to use this:

gbak -b -v mydb.gdb stdout | split -b mydb.bak1 2g mydb.bak2 2g mydb.bak3

the problem is that this creates a file named stdout and when it get's 2,1GB it colapses. It should output to the first backup file (mydb.bak1) instead of creating a file named stdout.

What am i doing wrong? is there any other way to achive this?

Thanks for any help
# 2  
Old 01-31-2004
I have been looking and searching and i have come up with another question.
Is it possible that it doesn't exist de device /dev/stdout in my system? if it doen't exist, is it possible to creat it?
I think that's why stdout creates a file instead of piping it to the backup files.
# 3  
Old 02-02-2004
pipe and stdout

Hi there
I'm trying to understand how "|" works.
well, say for instance :

who | wc -l

my question is, does the second command wait for the first to finish or will it interact with the first and process as it gets input from the first?

Another question is about stdout in HP-UX.
I have looked up and found that in a RedHat Linux for instance, exists the device "/dev/stdout" , and i can use it to send output instead to a file. But there is no such device in my HP-UX system.
Simply doesn't exist. Is there an alternative for stdout or is there a way to create this device?
what i realy need is to execute a command and send the output to stdout so that another command gets the stdin and process it.

thanks
# 4  
Old 02-02-2004
in unix, the concept is that "everything is a file." most programs are written to take input, and give output. and this is usually plain output dumped to the terminal. now, if every program is written to take input when run, and expel output when run, you can see how you can connect two programs together with the | pipe.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Stdout in file

I cannot figure out what is wrong.... I have 3 files with IP addresses: file1 134.123.3.236 file2 134.123.3.235 file3 134.123.5.237 I type "prob1 Oops x2x3x4". Then my code creates file with name Oops and first line x2x3x4. Moreover, my code generate IP and it gives to file Oops as a second... (1 Reply)
Discussion started by: Manu1234567
1 Replies

2. Shell Programming and Scripting

How to ignore Pipe in Pipe delimited file?

Hi guys, I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file for eg: file 1: xx|yy|"xyz|zzz"|zzz|12... using below awk command awk 'BEGIN {FS=OFS="|" } print $3 i would get xyz But i want as : xyz|zzz to consider as whole column... (13 Replies)
Discussion started by: rohit_shinez
13 Replies

3. Cybersecurity

How do I wipe stdout?

Today I used Terminal (invoked from Mac OS X 10.4.11) to view some data that is secured by a password. After exiting Terminal, it occurred to me that a vestige of the data displayed on my screen might reside in memory or in disk file ... the actual file used for stdout, for example. Do I need... (1 Reply)
Discussion started by: dcollins
1 Replies

4. UNIX for Dummies Questions & Answers

STDout

Hi, I have a program set to read in a text file, change certain characters and then print the altered version to the screen but does anyone know how to save the new version as another text file? And, if possible, how to specify the file name, and perhaps location? Thanks! (2 Replies)
Discussion started by: PerlNutt
2 Replies

5. Shell Programming and Scripting

Replace pipe with Broken Pipe

Hi All , Is there any way to replace the pipe ( | ) with the broken pipe (0xA6) in unix (1 Reply)
Discussion started by: saj
1 Replies

6. Programming

Reading stdout from pipe

Hi there, I am trying to read stdout from a child process to parent using pipe. I am unable to do so. I would appreciate it if someone can point me in the right direction. Here's my sample program for basic input output: #include <stdio.h> int main() { char buffer;... (3 Replies)
Discussion started by: Parker_
3 Replies

7. Programming

redirect stdout

hello again! i use dup2 to redirect stdout. I run what i want, now i want undo this redirection. how can i do that? thanx in advance (7 Replies)
Discussion started by: nicos
7 Replies

8. Programming

C++ How to use pipe() & fork() with stdin and stdout to another program

Hi, Program A: uses pipe() I am able to read the stdout of PROGAM B (stdout got through system() command) into PROGRAM A using: * child -> dup2(fd, STDOUT_FILENO); -> execl("/path/PROGRAM B", "PROGRAM B", NULL); * parent -> char line; -> read(fd, line, 100); Question:... (2 Replies)
Discussion started by: vvaidyan
2 Replies

9. Shell Programming and Scripting

Executing Stdout ???

Hiya all, Simple question - yet no simple answer im afraid ! Is there a way to execute a shell script (child) which returns one line and get the current (parent) shell to execute the stdout from the child ??? example child.sh #!/bin/sh echo "setenv DISPLAY xxx:03" parent_prompt>... (5 Replies)
Discussion started by: fawqati
5 Replies

10. UNIX for Advanced & Expert Users

STDOUT truncation

Operating system - Solaris 8, Korn shell, xterm Command /usr/proc/bin/ptree outputs the process tree exactly as I want with all detail However, /usr/proc/bin/ptree | more truncates the process descriptions at an 80 character point. If the process tree has marched enough to the right,... (3 Replies)
Discussion started by: JerryHone
3 Replies
Login or Register to Ask a Question