Stdout is the standard output stream is the default destination of regular output for applications.

learn more… | top users | synonyms

1
vote
1answer
34 views

How to split and recombine stdout pipe in bash?

I am parsing text on the command line. How can I take the output of one command and use it in two places in the next command? some_command | head -n $( awk '/search_term/ {print FNR} ...
0
votes
1answer
52 views

`if` statement with stdout && passing xargs through pipe

Say I have a list.txt of files I want to check. cat list.txt and for each file, I want to perform an action cat list.txt | xargs -I {} touch {} But depending on the outcome of the action, I want ...
0
votes
0answers
53 views

ffprobe: selecting from time until the next IFrame

I'm using ffprobe to get a set a set of frames starting from one IFrame to the next. ffprobe "<file>.MP4" -select_streams v -show_frames -read_intervals 30.031 When I'm done processing this ...
0
votes
0answers
10 views

tmux freezed pane in copy-mode

tmux seems to have a limit on scroll backs buffer and block my process when it is full. Any method to prevent accidental blocking of process? Maybe auto quite the copy-mode when I disconnect? How to ...
1
vote
2answers
17 views

How do I output a variable without changing if it has a newline or not in a shell script?

I have a shell script that takes input from another shell script. The stream gets piped in on stdin. I need to capture all the bytes of the stdin stream to a single variable in the shell script. ...
0
votes
0answers
53 views

How can I view the stdout output from an app that I double-click?

How can I view the stdout output from an app that I double-click or use the open -a command to launch? You used to be able to view it (in real time) in the Console app, but it seems that in 10.9.3 ...
0
votes
0answers
13 views

How to get stdout of another program [duplicate]

Some Linux program prog1 permanently prints to console. I'd like to read and analyse it's stdout in my C program prog2 as stdin. I can't change prog1 source. I expect something like this command: ...
0
votes
1answer
570 views

Receiving FFMPEG error -22 when piping data to stdout

I am attempting to use FFMPEG to transcode avi files to mp4 and pipe the data to stdout using the following command (technically through NodeJS, but I receive the same error when executing the ...
0
votes
0answers
20 views

nmap buffering output, any way to get faster output?

I'm running nmap against the 256 IPs on my local network. $ nmap -sS -p 80,8080,443,8888 192.168.1.1/24 | less I'd like interactive output piped to less, that I can view as the scan progresses. ...
0
votes
0answers
11 views

remove permission spam for find is not working tcsh enviroment

Hello this question is asked a lot like here: However, my environment on (csh or tcsh) seems to add a space but I can't figure out why. for instance, on bash: find /. -user `whoami` 2>/dev/null ...
1
vote
2answers
400 views

How to quieten tcpdump output when reading a pcap file?

I notice that when using tcpdump to read a pcap file, the tcpdump command somehow manages to print information to my console even when I redirect both STDOUT and STDERR. How can I prevent tcpdump from ...
0
votes
0answers
56 views

Shell hangs after passing STDIN to EDITOR with -w parameter

I want to edit svn's svn:ignore property: svn propedit svn:ignore . This doesn't work: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time ...
0
votes
0answers
27 views

stdout error using cross-compiled gpg

I compiled gnupg(ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.16.tar.bz2) for an armv5l processor using the ulibc cross compiler ...
0
votes
2answers
390 views

How to redirect a part of stderr and stdout to /dev/null

My program outputs to stderr and stdout. I want to grep for "pattern" either in stderr and stdout. And I want the rest to be sent to /dev/null. If I pipe after redirect stderr : ./prog 2>/dev/null ...
1
vote
2answers
188 views

Stdout and stderror in CentOS

I am exec command: yum info mcrypt | grep -i error > /dev/null yum info mcrypt | grep -i error 2> /dev/null But i see: Error: No matching Packages to list How I can hide this messasge ...
2
votes
1answer
197 views

Using the same file as stdin and stdout results in empty file

If want to filter a file but if I use the same file as input and output the output file is empty. Is there another solution instead of using a second file? php -r "echo preg_replace('~/\* DEV ...
1
vote
1answer
311 views

How can I pipe the output of *all* entered shell commands into another? (e.g. pipe everything into 'lolcat')

Good Afternoon, (OS X user) I am specifically trying to pipe the output of every shell command I type into the ruby gem 'lolcat' (which makes the output to the terminal rainbow colored). Is there a ...
2
votes
1answer
187 views

What happens if dd encounters errors while output of dd is being piped to gzip?

Suppose that dd if=/dev/sda bs=100M | gzip -c > somefile.img.gz is done. If errors occur in dd, do I get to see error messages in terminal, or do they get ignored? Also, suppose that dd ...
18
votes
3answers
2k views

Why does the output of some Linux programs go to neither STDOUT nor STDERR?

Why does the output of some Linux programs go to neither STDOUT nor STDERR? Actually, I want to know how to reliably capture all program output, no matter what 'stream' it uses. The problem I have is ...
1
vote
4answers
3k views

How can I stop cat output immediately despite massive output?

I'm looking for someway to stop the output to STDOUT when I realize a command is wrong. For instance, if I accidentally cat a very large file. Usually it will eventually stop if you hold down ctrl + ...
3
votes
1answer
138 views

Any way to view stdout of a program after it has been started in gnome-shell?

So, if I run a program through the menus in gnome-shell, is there a way to view stdout and stderr? Or is there some kind of hack to achieve this functionality? Or is everything just sent to ...
16
votes
2answers
5k views

Can I make cURL fail with an exitCode different than 0 if the HTTP status code is not 200?

I was always assuming that when curl got an HTTP 500 response it was returning an exit code that meant failure (!= 0), but that seems to be not the case. Is there a way I can I make cURL fail with an ...
1
vote
3answers
797 views

zcat | head : write error from large gz file

I was trying zcat to get only the first 1M lines of a compressed .gzip file into a new one. However, I get the following error: $ zcat path/to/R2.fq.gz | head -100 >R2.fqtest head: write error: ...
3
votes
1answer
657 views

Why can I see password prompts through redirecting output?

So, I've got a command that I'm issuing that is essentially 'ssh'ing into various hosts: command 2&>1 | grep "desired output" Every once in a while, in the midst of the command, it'll run ...
1
vote
1answer
760 views

How to get rid of UDP checksum error messages in virtual console?

Whenever I am streaming a video in the web browser, while connected to my school LAN via ethernet, and switch to the virtual console (ctrl-alt-f1) on Ubuntu, I get an error that looks like the ...
1
vote
2answers
289 views

reading output of a python file being logged in the console

I started playing with the logging module in Python recently. My output gets sent to a log file now. So far, so good. But I'd also like to be able to keep tabs on it in progress, without dealing with ...
1
vote
1answer
102 views

Is it possible to send the output of -w and -o Curl streams to different files? How?

I'd like to run a curl command, grep the output (response payload) for some keywords, then also print some metrics via the -w option. I think this would be easy to do if I could direct the -o ...
1
vote
1answer
411 views

Redirecting to /dev/null and a file at the same time

I'm trying to execute the following command: find . -name ".[ch]" | xargs grep -in pattern > file There are some errors that are printed on stderr because a few files are not found. How can I ...
2
votes
2answers
178 views

Any way to stream a file in linux

I have a terminal output which I'd like to be available to several users currently something like: command > /var/logs for the input, and: watch tail -30 /var/logs for the input terminals. ...
3
votes
4answers
2k views

Determine if output is stdout or stderr

How can I determine if what a process is outputting is stdout or stderr?
3
votes
2answers
3k views

Redirect stdout to a file when process is run in background

How can I redirect the stdout of a program to a file when it's run in the background? I have a program that generates output every second. When I run it normally and redirect to a file, the output ...
1
vote
1answer
699 views

How to open the stdout with Notepad++?

On OSX TextMate have the alias mate which you can use with the pipe to open other program's stdout. How can I achieve the same effect in Windows 7 with Notepad++? Ex.: git diff master|edit
15
votes
2answers
6k views

Pipe gunzip and mysql to gunzip a dump and import it

I have a .gz sql dump file (example: foo.sql.gz) that i want import in my database with the classic mysql command. gunzip -c foo.sql.gz > foo.sql mysql -uroot -ppassword foo < foo.sql foo is ...
9
votes
1answer
2k views

Copy terminal output to Mac clipboard?

I need to directly copy the terminal stdout to the clipboard on Mac. How would I do this? Example: echo sometext | copy_to_clipboard or echo sometext > /private/clipboard.txt
2
votes
2answers
2k views

Encrypting to standard output with gnupg

I'm trying to encrypt something with gpg -a and return the result to standard out rather than a file. According to the manual, it should be sufficient to omit an --output flag, but that doesn't seem ...
1
vote
1answer
790 views

How can you move (or copy) all files of a certain type to a directory in Unix?

I'm not very familiar with all the tricks of grep/find/awk/xargs quite yet, so be patient with me =] I have a particular file type say *.xxx, in random places throughout a certain directory. How can ...
0
votes
0answers
962 views

bash: redirect the stderr/stdout of a running process?

I have a running process running in a bash terminal that is printing some prompt, and I would like to send it to the background with the stderr/stdout prompt that is printing either redirected to ...
0
votes
0answers
803 views

STDOUT redirection to a file does not work if Groovy script run directly from command line (.groovy in PATHEXT)

I've updated the title, please see update below for the reason. I have asked this question on Stackoverflow, but still didn't receive an answer. Groovy: redirect stdout to a file does not work. ...
2
votes
1answer
1k views

Different output when redirecting

$ mysql -e 'select a,b from tablefoo' databasename yields +---+---+ | a | b | +---+---+ | 1 | 0 | | 2 | 1 | +---+---+ whereas $ mysql -e 'select a,b from tablefoo' databasename > file ...
4
votes
1answer
4k views

How to tar/untar the output on the fly

What is the idiomatic way to do the following tar to stdout read this tar output from stdout and extract to some other folder. My solution is tar --to-stdout .. | tar -C somefolder -xvf - But ...
3
votes
2answers
1k views

What is the use of binary output on stdout?

Some programs print their binary output directly on stdout. Here are some examples: tar -c file.png dd if=file.png Well, I see that the output can be redirected to a file. But these programs ...
20
votes
4answers
15k views

How do you redirect wget to standard out?

I have a crontab that wgets a PHP page every five minutes (just to run some the PHP code), and I want to send the output to standard out. I couldn't find it in the wget manual. I'm looking for ...
1
vote
1answer
374 views

bash - record output after program execution

I know that I can redirect stdout to a file before running a script, but is there a way to access the whole output of a program that already ran? When the output is too long it gets cut out by the ...
0
votes
1answer
30 views

Piping results back into the program that generates them

I've got a program that can take input from stdin and produces output in the stdout like this: cat initial_input.txt | myprogram myindex myoptions - | filter_output > outfile.txt The program ...
13
votes
6answers
8k views

Log rotation of stdout?

I have a Linux program which can write information to stdout and stderr. I have a shell script which redirects that output to a file in /var/log. (Via >> and 2>&1.) Is there a way to ...
4
votes
2answers
4k views

Redirect 7-Zip's command-line output to /dev/null on Windows when extracting a .7z file

I have a command such as "C:\Program Files\7-zip\7z.exe" x foo.7z -y which will extract (with full paths) to the current directory. What it does that I don't want, though, is to spool out the ...
11
votes
3answers
14k views

Windows: Command line redirection to text file while also seeing output

I'm writing a C program in Windows, my printf calls print to the command line, and I know that I can redirect all this output to a text file using: myProgram.exe > mylog.txt However, I wish to ...
1
vote
1answer
142 views

Do each application need to support writing to /dev/stdout or /dev/fd1 or is that handled transparently by the OS?

I tried this command to print the buffer of an existing screen session to stdout but I don't know why it doesn't print anything. screen -x lftp -X hardcopy /dev/fd/1 screen -x lftp -X hardcopy ...
3
votes
1answer
1k views

copy (split?) stdout instead of redirecting it

In Bash, I'd like to redirect stdout to a file (>> mylog.txt) but also see the stdout output on the screen.. How can I do it with bash?
2
votes
3answers
2k views

Windows how to redirect file parameter to stdout? (Windows equivalent of `/dev/stdout`)

Windows console: Tool A can write binary data to a file, but has no option for telling it to use stdout. Tool B can read binary data from stdin and process the info in it. How can I get the output ...