OpenSource For You

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, respective­ly. We can suppress these messages by using the ‘-q’ or ‘—quiet’ option.

Let’s congratula­te ourselves! We didn't lose any important data.

Instead of providing an interactiv­e shell, we can instruct Script to execute commands. The ‘-c’ or ‘—command’ option will do this job. As we are not executing the commands interactiv­ely, 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:

Newspapers in English

Newspapers from India