Questions tagged [stdout]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
138 views

Pipe to compressed file but also print content to terminal

How do I maintain a readable output from my program while also putting that same output into a compressed file, gzip or otherwise, so I can parse it later? I run a command that generates a lot of ...
FalcoGer's user avatar
  • 847
0 votes
2 answers
120 views

STDOUT not performing as expected in script

Having just been helped to get my script functioning on directories with spaces in the name (question 1447738 - thank you, again), I thought I'd like to pass its output to a text file. Here's the ...
JamesB's user avatar
  • 33
1 vote
1 answer
2k views

xxd on Linux 22.04 LTS - Can I write one small file into a larger file at a given offset without copy and pasting contents of small file?

I'm playing around with trying to set up patching copies of old GameBoy Pokemon games. I can do it all manually via other apps on Windows, and could maybe scrummage around for a Windows command line ...
Tim50001's user avatar
0 votes
2 answers
75 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 ...
slyfox1186's user avatar
3 votes
3 answers
2k 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 ...
Paul Molodowitch's user avatar
0 votes
1 answer
819 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 ...
zzzhhh's user avatar
  • 227
0 votes
1 answer
342 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....
Normal's user avatar
  • 123
0 votes
1 answer
1k 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 ...
luis.ap.uyen's user avatar
0 votes
1 answer
305 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 &>/...
Saxtheowl's user avatar
  • 1,629
0 votes
0 answers
121 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 ...
Example person's user avatar
0 votes
1 answer
791 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
userDepth's user avatar
  • 1,980
1 vote
1 answer
1k 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 ...
bela53's user avatar
  • 151
11 votes
1 answer
13k 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:...
jfhr's user avatar
  • 213
3 votes
4 answers
6k 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 ...
user4002112's user avatar
1 vote
2 answers
352 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 ...
ladmanj's user avatar
  • 11
1 vote
1 answer
781 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....
John's user avatar
  • 111
8 votes
3 answers
7k 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/...
Ani's user avatar
  • 89
1 vote
1 answer
3k 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 ...
Kirill's user avatar
  • 11
2 votes
0 answers
72 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 ...
HelloWorld's user avatar
1 vote
0 answers
63 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 ...
Lacey's user avatar
  • 11
5 votes
2 answers
2k 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:...
cohill Oniell's user avatar
22 votes
3 answers
14k 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 ...
vico's user avatar
  • 4,467
-2 votes
1 answer
353 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 ...
CyberMad's user avatar
3 votes
1 answer
408 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 ...
Bradley Odell's user avatar
2 votes
0 answers
277 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 ...
Matt Rideout's user avatar
0 votes
0 answers
333 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=...
Ncifra's user avatar
  • 101
0 votes
0 answers
334 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 ...
shg's user avatar
  • 21
0 votes
0 answers
385 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 ...
errata's user avatar
  • 101
1 vote
2 answers
1k 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 ...
american-ninja-warrior's user avatar
1 vote
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'...
derHugo's user avatar
  • 3,306
8 votes
2 answers
34k 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 ...
derHugo's user avatar
  • 3,306
0 votes
0 answers
160 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-...
LUser's user avatar
  • 164
0 votes
0 answers
461 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: ...
13aal's user avatar
  • 334
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 (...
Ariyan's user avatar
  • 494
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 ./...
Sting's user avatar
  • 3
1 vote
1 answer
110 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 ...
cylondude's user avatar
  • 201
4 votes
2 answers
4k 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 ...
H2ONaCl's user avatar
  • 9,543
1 vote
1 answer
9k 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 &...
Anon's user avatar
  • 11.9k
0 votes
1 answer
175 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 ...
yoyo_fun's user avatar
  • 181
1 vote
1 answer
383 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....
user624703's user avatar
4 votes
2 answers
3k 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 ...
Najmi's user avatar
  • 63
4 votes
2 answers
22k 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 ...
Ricardo Beschieru's user avatar
-1 votes
1 answer
104 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 ...
wjandrea's user avatar
  • 14.1k
0 votes
1 answer
69 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 ...
JimB's user avatar
  • 1
3 votes
1 answer
608 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....
Tfb9's user avatar
  • 681
0 votes
1 answer
237 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 ...
IMTheNachoMan's user avatar
0 votes
1 answer
99 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, ...
Mr.m's user avatar
  • 76
1 vote
0 answers
867 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 ...
Junchao Gu's user avatar
20 votes
2 answers
11k 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-...
Athan Clark's 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 ...
kos's user avatar
  • 35.6k