Sponsored Content
Full Discussion: pipe and stdout
Top Forums UNIX for Dummies Questions & Answers pipe and stdout Post 47063 by norsk hedensk on Monday 2nd of February 2004 07:20:08 AM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SE_DPKG(8)								NSA								SE_DPKG(8)

NAME
se_dpkg,se_apt-get,se_aptitude,se_dpkg-reconfigure,se_dselect,se_synaptic - run a Debian package system programs in the proper security context SYNOPSIS
se_dpkg [ <<dpkg ARGS>> ... ] se_apt-get [ <<apt-get ARGS>> ... ] se_aptitude [ <<aptitude ARGS>> ... ] se_dpkg-reconfigure [ <<dpkg-reconfigure ARGS>> ... ] se_dselect [ <<dselect ARGS>> ... ] se_synaptic [ <<synaptic ARGS>> ... ] DESCRIPTION
These programs are all symbolic links to a simple wrapper script that uses run_init to run actually run the corresponding program after setting up the proper context. run_init acquires a new Psuedo terminal, forks a child process that binds to the pseudo terminal, forks the program (dpkg,apt-get,aptitude,synaptic,dselect,ordpkg-reconfigure) that the user actually needs to run, and then sits around and connects the physical terminal it was invoked upon with the psuedo terminal, passing keyboard into to the child process, and passing the output of the child process to the physical terminal. It sets up the psuedo terminal properly based on the physical terminal attributes, and then sets the user's terminal to RAW mode, taking care to reset it on exit. AUTHOR
This manual page was written by Manoj Srivastava <srivasta@debian.org>, for the Debian GNU/Linux system. Security Enhanced Linux January 2008 SE_DPKG(8)
All times are GMT -4. The time now is 04:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy