Question: The command should be one line 2. A bash command to search through the past 50 commands that a user has run via bash, and

 The command should be one line 2. A bash command to

The command should be one line

2. A bash command to search through the past 50 commands that a user has run via bash, and search for only ones containing "cd" or "ls". All other commands should be ignored. For example, say that the user has run a variety of different kinds of commands in the past 50 commands, and only 3 contain those keywords. Those would be: $ls-lta$cd/usr/lib$grep"cdna" In that case, if we ran the command, we should get: \$your_command cd /usr/lib grep "cdna" ls -lta The commands should be sorted via the sort command

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!