Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I'm trying to spawn a new terminal, execute a few commands and pipe their output to stdin of the original process. A mwe of what I'm trying to do is the following bash one-liner:
$ xterm -e sh -c &...
I have dd from GNU coreutils 8.32.
When I run { echo a; sleep 1; echo b; } | dd bs=4 count=1 then I get
a
0+1 records in
0+1 records out
2 bytes copied, 2.0381e-05 s, 98.1 kB/s
dd terminates during ...
What explains the following inconsistency in the reported contents of /dev/fd?
erhannis@mnode6:/dev/fd$ ll /dev/fd/
total 0
dr-x------ 2 erhannis erhannis 0 Jan 12 22:10 .
dr-xr-xr-x 9 erhannis ...
I have a device under test (DUT) and I measure its power usage the using a Power Analyzer Datalogger using the data from /dev/ttyUSB0.
The problem is that the DUT is now remotely from the workstation ...
Take the following Bash script 3-output-writer.sh:
echo A >&1
echo B >&2
echo C >&3
Of course when ran as . 3-output-writer.sh it gets the error 3: Bad file descriptor, because ...
I am able to write my video to virtual video device with the help of V4l2. Though video plays, audio is not available in the other end in Google meet. How to get stream audio of the video also.
I am ...
How can I check on my debian server, if content is being used (streamed) by the plex media server? I want to know if someone is using the server and react to that.
Is there a way to find out via ...
Let's say that there is one huge db.sql.gz of size 100GB available https://example.com/db/backups/db.sql.gz and the server supports range requests.
So instead of downloading the entire file, I ...
I am kinda new to Linux.
My base issue: I need to show the output of curl cheat.sh/python like a man or less page, so that I can easily scroll up and down.
What have I tried: curl cheat.sh/python | ...
I know thats a pretty dumb question but I didn't found this precise question on internet
I try to tar -cvjf all the contents of a directory (/*) and directly redirect that to a file (> file) but ...
I had been doing some work with an old SVR4 box with serial i/o when I found that the driver for the serial card did not support TIOCMGET through an ioctl call (e.g. ioctl(fd, TIOCMGET, &arg);). ...
I'ld like to hide ugly data from being shown by command line tools like cat (and maybe simple text editors too) which often get confused by binary data. For example a VT100 terminal sometimes gets ...
I need to determine the filetype on an indeterminate number of base64-encoded filestreams coming from stdin (image files base64-encoded and cat'ed).
A single file would simply be ... | base64 -d | ...
A paragraph from APUE Chapter 5.4 about line buffer:
Line buffered. In this case, the standard I/O library performs I/O when a newline character is encountered on input or output. This allows us ...
I have try to use ffmpeg to download youtube media in mp3.
ffmpeg -i <url> -f mp3 output.mp3
It's working with other urls, but not with youtube-dl retrived youtube video urls. Ffmpeg returns ...
Say I ramify a video stream to 2 ffplay processes
cat video.mp4 | tee >(ffplay -i -) >(ffplay -i -) > /dev/null
Now, if I kill one of the ffplay process, the stream is stopped which is not ...
I would like to pipe a text file with commands to a telnet session I have open on a ssh client, Is this possible?
an example:
I have a text file cmds that contains commands like
FirstFunction(A,B,C,...
The POSIX.1-2008 XRAT rationale states that X/Open STREAMS may be removed from future versions of the standard, and that strictly conforming applications shouldn't use them, but it doesn't explain why....
Let's have any stream of binary data (like /dev/random, /dev/zero, etc.).
Let's have a file which size can be N at maximum.
Let's the N is in order of gigabytes.
Is there any elegant method/...
I usually use command1 | command2 | command3 a lot in Linux but most of them are dealing with definite content.
When I tried this with an infinite stream cat | sed '' | sed '' which hopefully ...
I am putting together a presentation for a non-technical audience. I have a program running in bash that outputs a continuous stream of values, a few of which are important. I would like to highlight ...
Why does the following not output "hello" line?
watch bash -c 'echo hello'
As this one?
watch 'echo hello'
I expected to have echo write to bash output directly and this to be read by watch and ...
I encountered a problem the other day while running multiple tty sessions in separate terminal windows. I was running a expensive disk access command and was waiting for it to return. Meanwhile I was ...
stdin, stdout, stderr are some integers that index into a data structure which 'knows' which I/O channels are to be used for the process. I understand this data structure is unique to every process. ...
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.