Get run command from stdout
See original GitHub issueHi, I’m often running multiple commands in dvc run, which can be done by wrapping the command in quotes:
dvc run -d in.txt -o out.txt 'cp in.txt out.txt; for i in {1..10}; do echo ${i} >> out.txt; done'
# Running command:
# cp in.txt out.txt; for i in {1..10}; do echo ${i} >> out.txt; done
It would be nice if I could input the command using stdout prompt instead, e.g. by running:
dvc run -d in.txt -o out.txt --interactive
# > Enter command:
cp in.txt out.txt; for i in {1..10}; do echo ${i} >> out.txt; done
# Running command:
# cp in.txt out.txt; for i in {1..10}; do echo ${i} >> out.txt; done
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How to execute the output of a command within the current ...
I pipe whatever I got to sh and it runs it. My problem is, that means starting a new sub shell. I'd rather...
Read more >Execute stdout results - command line - Unix Stack Exchange
Try doing this : printf '%s\n' /usr/bin/* | while IFS= read -r cmd; do "$cmd" --version; done.
Read more >Ubuntu: Run the output of another command - Super User
I would like to have a single command line execution that will run commandlineB with the given parameter(s). Is there any simple way...
Read more >How to redirect shell command output | Enable Sysadmin
How to redirect shell output · 1. Redirect STDOUT · 2. Redirect STDERR · 3. Send STDOUT and STDERR to the same file...
Read more >How to execute external commands and use their STDOUT in ...
Use the !! method to execute the command and get the standard output from the resulting process as a String . Just like...
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 Free
Top 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
Indeed, @efiop , introducing a
--cmd
flag or handling--
correctly to stop the parser could work, however, I wasn’t taking into account Windows users (maybe globbing wouldn’t work the same way), so it would be nice to have some agnostic / non-shell dependent way to handle this 👍Looks like we could close this. Please feel free to reopen, if I’ve missed something.