[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to keep output of apt-get in a file ?



>     I used the script utility from the bsdutils package but would be
>     interested in a more readable solution cause script reports all control
>     characters as well.

This is the best way to capture output froma program.  While I am unsure about
apt, some other programs are immune to shell redirection (since they open
their own output streams straight to your display) and can only be logged
with script.

If you want to make your script output more legible, try piping it through
  tr -cs '[a-zA-Z0-9. ]' '[\n*]'

And try to avoid using editors etc. while in the script session.

Carl


Reply to: