2022 Developer Survey is open! Take survey.

Questions tagged [stdout]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
32 views

Not using > makes all the difference in opening gedit through terminal w/o errors or locking the terminal

I have been experimenting with using terminal to open gedit with any type of file it is capable of using and not having the terminal blocked until the file is closed OR have any error messages in the ...
user avatar
3 votes
3 answers
346 views

How can I view the stdout / stderr from the bash login shell?

I'm trying to debug a strange issue with my ~/.bash_profile, and I'd like to be able to see if there are any errors / etc printed when it's run. Is there some log or such somewhere that contains the ...
user avatar
0 votes
1 answer
136 views

How to display error messages during .configure to the standard console?

When compiling from source, we use .configure as the first step. .configure may call some other commands like cc which may fail and print error messages, like header not found or some other compile ...
user avatar
  • 67
0 votes
1 answer
63 views

How to prevent the gio open command from outputting texting in the console?

I use the gio open command very often, so what I have done is I added an alias for it in the .bashrc file alias open="gio open" Hence, I can simply write open . or open ~/Pictures/example....
user avatar
  • 13
0 votes
1 answer
552 views

Automatically enter user input several times to command stdin

I need to perform a conversion of digital certificates from pfx to pem on an external application from which I can run system commands. I can do this from CLI by using the command: openssl pkcs12 -in ...
user avatar
0 votes
1 answer
154 views

Retrieve information from running process

I often force process to not display their output so that I can more easily run multiple of them in the background, for example: youtube-dl -f 22 https://www.youtube.com/watch?v=oyg0xYH12Qg &>/...
user avatar
  • 717
0 votes
0 answers
88 views

Accidentally ran wget -O-, and it outputted stdout to terminal

Accidentally ran wget -O- https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.22.tar.gz with the -O- thing, and it outputted random stuff to terminal. Is it possible that it could've done ...
user avatar
0 votes
1 answer
403 views

How to use find command and filter error messages

I'm running this command : find / | grep corectrl | grep log And I get a lot of permission denied errors and I would like to send stderr to null
user avatar
  • 1,870
1 vote
1 answer
611 views

Pipe password argument to mount shell command

Status quo Given are following /etc/fstab mount points: //server/app /home/user/server/app cifs noauto,user,vers=3.11 0 0 //server/code /home/user/server/code cifs noauto,user,vers=3.11 0 0 These ...
user avatar
  • 141
8 votes
1 answer
10k views

Why should apt-key output not be parsed?

To validate that the docker gpg key is installed, I ran: sudo apt-key fingerprint 0EBFCD88 | grep "9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88" Which resulted in the following output:...
user avatar
  • 183
4 votes
4 answers
5k views

How to redirect the output of a command to a function but suppress the error and output to console?

I need to redirect the output of a command that I am running to a log file with timestamp (hence a function instead of the log file itself) but the error and the output, both should not be showing in ...
user avatar
1 vote
2 answers
278 views

(K)ubuntu 19.10 can't print text files from console

I have trouble with printing system on my Kubuntu 19.10 I tried so many things that i can't track completely, but the following is the core of the problem. $ echo "test" | lp -d Boomaga request id ...
user avatar
  • 11
1 vote
1 answer
470 views

Failing to Redirect Output to File

I want to redirect output from "time" to a file. However, my attempts to redirect stdout, stderr, or both, are not working. For example, when I use: time python process-column.py 2>/tmp/times....
user avatar
  • 111
8 votes
3 answers
4k views

systemd service output to terminal/pty

I am not able to figure out what option to pass in StandardOutput= for a unit file (.service), where I want to show some messages on the connected terminal from where the service is started! (console/...
user avatar
  • 49
1 vote
1 answer
1k views

SSH local STDOUT to file on remote server

I need to copy output from local command to remote server f.e: user@localhost$ ls | scp - user@remotehost:/user/remotefile got an error: -: No such file or directory sorry, but a cannot identify ...
user avatar
  • 11
2 votes
0 answers
65 views

OS laggy after echoing a string in file descriptors 0,1,2 (stdin, stdout, stderr)

I was trying to exploit capacity leaking to a C program (see below), by taking advantage of the non-existence of fclose() function to a file, that the program previously opened. In short, the ...
user avatar
1 vote
0 answers
55 views

Is there a terminal utility that I can use to 'occasionally' record stdout for long running processes?

An example would be the badblocks. Just now I was using it as sudo badblocks -sv /dev/sdb This utility takes a long time to work. Particularly for large disks from years ago that aren't in the best ...
user avatar
  • 11
5 votes
2 answers
1k views

Piping the output of comand columns

I am using lolcat to get the output of ls in color. To do this i have copied /usr/bin/ls to /usr/bin/lsslss (to avoid an endless loop since alias cannot acccept $* or $@) and I have added the function:...
user avatar
19 votes
3 answers
9k views

What is the meaning of & at the end of a command?

I have a startup script line: pyprogramm >> /dev/null 2>&1 & Meanings: >> /dev/null - redirect stdout to null device 2>&1 - redirect stderr to stdout (that is ...
user avatar
  • 3,857
-2 votes
1 answer
126 views

What is the stdout output in stream-redirection labs?

Inside the ‘stream-redirection’ folder there is a program called ‘program’. When you run this it will output to stdout and stderr. What is the stdout output? I have tried ./program, but it did not ...
user avatar
3 votes
1 answer
349 views

Bash file redirection bug?

From what I understand about program IO, there are stdin, stdout, and stderr data streams (and a return code). stdout and stderr are the two data output streams. So if I use bash redirection to close ...
user avatar
2 votes
0 answers
206 views

Print netplan config

Does netplan have any options available for writing how it interprets its config files to stdout, an arbitrary directory, or something similar? The context for my question is that I'm updating a ...
user avatar
0 votes
0 answers
268 views

Output logs to dynamically created folder structure (based on the current date), using upstart to create the service

I have the following upstart configuration: start on runlevel [2345] stop on runlevel [06] respawn respawn limit 99 5 #respawn is used to start the nodejs again, even if it fails. env NODE_ENV=...
user avatar
  • 101
0 votes
0 answers
329 views

Error message was neither redirected to STDERR nor to STDOUT, but it was really exist when output logs to screen?

The following commands were ran in Ubuntu 16.04 and the version of python is 3.5. When I ran the python routine without data redirection python3 opt_CNN2_dense.py Screen output ResourceExhausted ...
user avatar
  • 21
0 votes
0 answers
237 views

Communicating with background service

I have a process registered as a service running in the background which occasionally logs to stdout. It is some linux executable which, if run in the foreground, can receive user commands and respond ...
user avatar
  • 101
1 vote
2 answers
988 views

bash retry function with silencer

I found a bash function, that let's me retry commands. function retry { local n=1 local max=50 local delay=1 while true; do "$@" && break || { if [[ $n -lt $max ]]; then ...
user avatar
0 votes
2 answers
2k views

Git produces output in realtime to a file but I'm unable to echo it out in realtime directly in a while loop

What I want My actual long term goal is bypassing all the output of a git process into another function (in order to make a progress bar - see my older question for more details about that). What I'...
user avatar
  • 3,156
5 votes
2 answers
29k views

How to get git producing output to a file?

I wanted to write the output of git clone to a file using git clone https://github.com/someRepository > git_clone.file But instead I get the output displayed/updated in the terminal like ...
user avatar
  • 3,156
0 votes
0 answers
158 views

Pipe stdout through sed or awk command BEFORE redirecting to file? [duplicate]

I am still kind of new to programming, but willing to learn: I am struggling with a problem in following project: I am logging analog read-outs of an Arduino board. The Arduino board sends tab-...
user avatar
  • 145
0 votes
0 answers
359 views

How to stop file-roller from outputting anything and hanging on the process

I'm writing a program that uses file-roller to extract an ISO file. However I keep getting a warning and I don't want to see this warning. Also file-roller hangs after this warning. Gtk-Message: ...
user avatar
  • 324
3 votes
1 answer
3k views

using ffmpeg in bash script prints video data to stdout

I'm writing a bash script to convert some videos the problem is when I run ffmpeg directly in terminal it is OK and converts video correctly but when I use it in bash script it prints lots of data (...
user avatar
  • 464
0 votes
1 answer
1k views

grep in bash-script doesn't print message in log file

I'm trying to write the output of a command to a log file using grep: ./exeFile dir1/file.conf | grep textError > logTest.txt & But it doesn't write anything to the log file. If I use ./...
user avatar
  • 3
1 vote
1 answer
108 views

How to write the most recent line of a process to a readable file

I’ve got a question for you that is theoretical. While running a process in the terminal I often just care about the most recent last line. And I want to call the data in that line from another ...
user avatar
  • 201
3 votes
2 answers
3k views

example of console output that is not written to standard output

It seems read does not write to standard output. $ cat test.sh #!/bin/bash read -p "type a key and Enter" key echo "the key was $key" $ ./test.sh type a key and Enterx the key was x $ ./test.sh | tee ...
user avatar
  • 9,053
1 vote
1 answer
7k views

How do I save a shell's stderr and stdout to a file while still having it output to the terminal window? [duplicate]

I need stdout and stderr to a file, and my shell simultaneously. command > file.txt, the usual goto, will not output stderr to the file, nor output stdout to the terminal. command > file.txt &...
user avatar
  • 11.1k
0 votes
1 answer
72 views

How can I set the terminal to not automatically go to the last line if there the output in the terminal has been updated?

I have some programs that are continuously outputting data on the terminal. I however want to be able to scroll up and down while the program is outputting all this data to the terminal, but every ...
user avatar
  • 181
0 votes
1 answer
325 views

How to use the output of ettercap

To encrypt tshark output, I use tshark -w - | gpg -e > capture.pcap.gpg How do I do the same for ettercap? This command does not work ettercap -M arp -w - -T //// | gpg -e > capture.pcap....
user avatar
4 votes
2 answers
2k views

How to redirect dd progress in terminal to a log.txt file but still display it on the terminal during the process?

Here is my script :- sudo mate-terminal --geometry=50x10 -x sh -c "dd if=/dev/sda of=/dev/sdb status=progress 2>&1 | tee log.txt | md5sum > hash.txt | sha1sum > hash1.txt" I've seen ...
user avatar
  • 63
3 votes
2 answers
19k views

STDOUT and STDERR redirection for nc

I am trying to make a watchdog bash script which has to check if the port is open, based on the exit status, otherwise should start the daemon. Problem is I can't manage to avoid the script outputting ...
user avatar
-1 votes
1 answer
98 views

Some programs print errors to stdout instead of stderr, and don't set $? when an error occurs. Why? [closed]

See title. I've seen this twice recently, with both udisks and pacmd, and they are 100 times harder to script because of it. Why do programmers do this? For example, I want to switch the audio output ...
user avatar
  • 13.4k
0 votes
1 answer
66 views

Why is stdin/stdout failing with gplay on ubuntu?

I am trying to change gplay's volume level programmatically in a Java app. The video plays fine; I see gplay's menu; I get my first "Playing" prompt, and I write a "v" for "[v]Volume" but I never see ...
user avatar
  • 1
3 votes
1 answer
518 views

stderr of terminal in red, even with sudo

I am trying to make a working example for logrotate, and to help me through this I figured it was a good idea to turn stderr to red. Through some reading, I came upon stderred, which I meant to adopt....
user avatar
  • 661
0 votes
1 answer
222 views

run a command, send output to mail with stderror colored

I have a script that writes to the STDOUT and STDERR. I can pipe the script to mail so it sends me an email of the output. What I want to do now is have the STDERR of the output colored such that the ...
user avatar
0 votes
1 answer
86 views

Why does man -P behave differently when the output is redirected or piped?

man -P whoami ls This command will output user's name, just like whoami. But when you use pipe to redirect it to a file or to your screen like man -P whoami ls | cat or man -P whoami ls > file, ...
user avatar
  • 66
1 vote
0 answers
781 views

run a process in background and give stdout for it even if terminal is closed

I found some link here(Hide stdout of a process only when it is running in background) about redirecting running process' output but my case(a module logging to stdout) is a bit different. Cause I am ...
user avatar
18 votes
2 answers
10k views

systemd on 15.04 won't log stdout of unit

I'm currently trying to make a systemd unit as a web server. Currently, my foo.service file looks as follows: [Unit] Description=The Foo Web Server [Service] Type=simple ExecStart=/opt/foo/.cabal-...
user avatar
2 votes
1 answer
3k views

How to copy the stdout of a command to the clipboard in a default Ubuntu installation?

I ran up against this question, and i found it quite interesting. While researching for that, i found out that a solution had been posted already here on AskUbuntu, plus multiple times on ...
user avatar
  • 33.9k
0 votes
1 answer
164 views

Upstart and isstty(STDOUT_FILENO)

Many Linux programs use istty to determine whether STDOUT is a terminal or not. For example, ls will (by default) suppress coloured output if it's redirected (istty == 0). When running upstart jobs, ...
user avatar
  • 5,278
0 votes
1 answer
65 views

Could someone explain what the following command does?

Could someone explain me what the following command does? find / > allfiles.txt 2>/dev/null
user avatar
  • 1
1 vote
1 answer
184 views

untar content of folder from tar.gz archive that gets data from STDOUT (wget)

I want to extract the content of a single folder from a tar.gz archive that gets its input from the STDOUT of wget. My command looks like this: wget -O - http://example.com/file.tar.gz | tar -C /...
user avatar
  • 951