helpThe GNU Bourne-Again SHell - Support: sr #108483, Add a feature to log previous...


sr #108483: Add a feature to log previous command with output.

Submitted by:  None
Submitted on:  Sat 25 Jan 2014 04:10:27 AM UTC  
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  Wont Do
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 13 Nov 2015 02:51:21 PM UTC, comment #2:

This is not possible in the general case. Bash has no control over a command's output once it's invoked. Commands like `script' exist for this purpose.

Eduardo is correct that the terminal emulator is where the output is captured.

Chet Ramey <chet>
Project Administrator
Wed 25 Mar 2015 10:57:00 AM UTC, comment #1:

I'd argue that this is not needed. You can just copy-paste from your terminal emulator, or use a program like screen/tmux.

Eduardo Bustamante <dualbus>
Sat 25 Jan 2014 04:10:27 AM UTC, original submission:

How easy is it to ensure that every single command with all of its output gets logged to a file and cuts off at a certain limit or size.

Ideally the previous output could easily be fetched and/or parsed.
For example git status returns a bunch of files. How cool would it be to have a script called "feh" which retreived a certain trimmed line of the previous output, for example:

$ git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
# bar
# foo
nothing added to commit but untracked files present (use "git add" to track)
$ feh -2

or some other quick way to grab a single line, think about those long huge file names that appear.

Just a thought



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by dualbus (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-13 chet StatusNone => Wont Do

    Back to the top

    Powered by Savane 3.3