Command line options
Script provides many command line options to control its default behaviour. Let us see how this is done, one by one, with examples.
By default, the script command shows welcome and goodbye messages upon start-up and exit, respectively. We can suppress these messages by using the ‘-q’ or ‘—quiet’ option.
Let’s congratulate ourselves! We didn't lose any important data.
Instead of providing an interactive shell, we can instruct Script to execute commands. The ‘-c’ or ‘—command’ option will do this job. As we are not executing the commands interactively, the log file will contain only the output of the commands and not the commands themselves. The example below will give you a better idea about the ‘—command’ option: