how to pipe string to rest of commands
See original GitHub issueHi! I would like to simplify my usage of subprocess and so i found your work. It would seem that it does what is advertised to do (just trying to say that is an amazing project) but documentation is a bit lacking … i do not find a way to pipe a string to a custom chain (something like echo stdout_from_other_process | chain_of_shell_commands_that_will_run_in_my_pseudo_terminal
). Could someone give me a hint about it? 😃
Thank you!!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Pipe string with newline to command in bash? - Stack Overflow
try echo -e "${message}\n${changed}" | /usr/bin/php -q /home/chad/www/mantis.localhost/scripts/checkin.php. where -e enables interpretation ...
Read more >bash - How to pass a string to a command that expects a file?
You can use the "fake" filename /dev/stdin which represents the standard input. So execute this: echo "$the_recipe" | cook /dev/stdin.
Read more >how to pass string comand to shell pipe to execute it (output of ...
So i first wanted try it execute manually from bash to see if it works before i put it in the awk print...
Read more >How to pipe command output to other commands? - Super User
What I do in these situations is something like: ls | while read OUT; do echo $OUT; done but this is rather cumbersome....
Read more >Working with pipes on the Linux command line - Red Hat
One of the most powerful shell operators is the pipe ( | ). The pipe takes output from one command and uses it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
wow! thanks a lot for your help and info!!
Well, besides the security risks you are facing there you would have to escape single quotes yourself for
string1
. Maybe something in https://docs.python.org/3/library/shlex.html helps you to escape.