IamH1kc
IamH1kc

Reputation: 6762

How to add a text to every command typed in command line bash?

I want to concatenate /dev/null 2>&1 to every command typed in a bash prompt so that all the output gets logged.I don't want to type it after every command, so it would be nice if it automatically gets concatenated/executed after I type a command, so that the output is suppressed.

How do I do it?

Upvotes: 0

Views: 94

Answers (1)

choroba
choroba

Reputation: 241808

Can't you use script instead? It logs all the input and output.

Upvotes: 4

Related Questions