Linked Questions

4
votes
3answers
1k views

How do I redirect output of command into ls? [duplicate]

I have a problem with redirections : $ which python3 gives me /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 and $ ls -l /Library/Frameworks/Python.framework/Versions/3.7/bin/...
2
votes
1answer
4k views

Pipe output from one command to another command's non standard input [duplicate]

I would like to do something similar to the following: which someapplciation | cd outputfrompreviouscommand The command which provides a directory and I would like to be able to make that output my ...
2
votes
2answers
672 views

Insert result of command into an executable (one command) [duplicate]

Is it possible to insert the result of a command (or even a chain of commands) into an executable in one command? Something like this: ./a.out < echo 0 Or is it necessary to do this: echo 0 > ...
1
vote
2answers
402 views

Passing the output of a command to another in one line [duplicate]

I want to take a screenshot with import, and save it into a file whose name is current time. Here is what I've tried: sunqingyao:~$ date '+screenshot-%y%m%d-%H%M%S.png' screenshot-170716-173336.png #...
0
votes
2answers
140 views

Piping Output of Shuf Command [duplicate]

Fairly new to Linux. I have a nixie clock that runs off of a Raspberry Pi. I would like to send a random sequence of six digits to it every so often to help prolong the life of the Nixie tubes. ...
-1
votes
1answer
137 views

whereis, pipline and ls [duplicate]

When I type: whereis boost it shows: /usr/include/boost Now I want to list all the files in this directory, so I type: whereis boost | ls But it only shows the files in the current working ...
0
votes
1answer
72 views

Is it possible to put the output of one command into the middle of another [duplicate]

I am asking if there is a way to automatically put the output of a command into the middle of another. multimon-ng outputs: ZCZC-WXR-TOR-029037+0030-1051700-KEAX/NWS and i want that output to get ...
0
votes
0answers
14 views

Get docker container id and pipe to docker logs [duplicate]

I would like to get automate a process where I launch my container, get its id and see the logs, to make sure my application correctly started. Why I do is : docker run --name my-container docker ps ...
37
votes
3answers
33k views

Can I chain pgrep with kill?

I have noticed that | is used to send results of first command to the another. I would like to kill all processes that match a name. This is what pgrep normally does: $ pgrep name 5089 5105 And ...
1
vote
1answer
942 views

pipe one or more PIDs from pgrep into top's -p argument

I saw this nice question: Pass the output of previous command to next as an argument and tried to get what I wanted from it but no luck. I often want to watch my maxima/lisp process and instead of ...
1
vote
1answer
279 views

Pass the output from previous command to next command

I have two for loops below which creates final output as the sorted file,but I want to merge into one for loop only for i in *.txt; do cut -f 5,10 $i >$i.txt.out done ###sorting for i in *....
0
votes
2answers
194 views

Can I pipe stdout to the middle of a command with emacs?

The command emacs -nw foo -f org-mode opens the file foo in emacs in org-mode. Now, suppose that the filename foo is the output of a script. How could I pipe to my command? So, I'm trying to get ...