-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ability to read command output line by line in a loop
NOTE: the command need to be executed in the background. ``` for line in `tail -f /tmp/log &` { echo(line) } ``` Also combines the stdout and stderr of executed command in the same ouput, like native Go implementation of `cmd.CombinedOutput`.
- Loading branch information
1 parent
5de8d01
commit bf3307a
Showing
2 changed files
with
64 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters