echo and grep

Learn to enhance the grep command usage using glob patterns. Also, know about the echo command.

We'll cover the following

There is an option to check how the Bash expands a glob pattern. Use the echo command for that. Below are echo calls for checking the patterns:

echo *
echo ~/*
echo /*

The first one lists files in the current directory. The second and third command does the same for the home directory and the root directory, respectively.

Run the commands discussed in this lesson in the terminal below.

Get hands-on with 1200+ tech skills courses.