Choose the best solution:

You find you execute a series of commands on a recurring basis. You want this series of commands available from your login to run in the current shell. Choose the best solution:

You find you execute a series of commands on a recurring basis. You want this series of commands available from your login to run in the current shell. Choose the best solution:

A.
create a shell program

B.
create a function

C.
use the up arrow in BASH to find the command

D.
use BASH’s built-in ! function to run the last iteration of the command by the same name

Explanation:
A) you could create a shell script, but not really a shell program easily
C) you would need to do that for each of the series of commands
D) in bash "!" is the negation operator (! expression => True if expression is false).



Leave a Reply 0

Your email address will not be published. Required fields are marked *