This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add log_all_output #84
Open
mnp
wants to merge
6
commits into
dylanaraps:master
Choose a base branch
from
mnp:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
dylanaraps
reviewed
Sep 21, 2019
dylanaraps
reviewed
Sep 21, 2019
dylanaraps
reviewed
Sep 21, 2019
dylanaraps
reviewed
Sep 21, 2019
dylanaraps
reviewed
Sep 21, 2019
dylanaraps
reviewed
Sep 21, 2019
Are you able to also add a method in the example of undoing the redirection? |
LGTM otherwise. 👍 |
dylanaraps
reviewed
Sep 22, 2019
dylanaraps
reviewed
Sep 22, 2019
Hi !
happy to see continued development of this book and the bourne addition
too! (BTW, if not already planned, an inventory of bash incompatibilism
with bourne would be handy. I've never seen anything that intended to do
that...)
just a quick comment and observation about this PR,
I've seen many failed attempts at sites that wanted to log command line
invocations (in addition to output). Different contexts, sometimes shared
root logins, but also in scientific environments where it's important to
keep an electronic journal of the sequence of commands used. If $TIME
$USER@$HOST:$PWD
could be recorded along with command line invocations (and parameter
expansion, without escape codes for cursor movement etc)---that would be
really useful, feature request, with the caveat, I know this would be a
very difficult task.
also, I noticed FD 6 was used in the last indentation patch, maybe that
should be exec 2>&1?
Thanks,
-George
…On Sun, Sep 22, 2019 at 10:00 AM black ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md
<#84 (comment)>
:
> @@ -1040,23 +1040,37 @@ printf '' >file
```sh
log_all_output() {
# Usage: log_all_output log_filename
+ exec 6>&1 # save stdout
Indentation is 4 spaces.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#84?email_source=notifications&email_token=AAE3QC6MQLUSRV5D5XBRGITQK6QCZA5CNFSM4IY6WMT2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCFQDLBI#pullrequestreview-291517829>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAE3QC5MGJUIJIVFYAJ4FB3QK6QCZANCNFSM4IY6WMTQ>
.
--
George Georgalis, (415) 894-2710, http://www.galis.org/
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use exec to redirect all shell output thereafter.