Hello, my name is Stephanie.
Welcome to another lecture of our course.
In this section we are going to look at the some of the magic that occurs on the command line when we
press the enter key.
While we will examine several interesting and complex features of the shell, we will do it with just
a one new command which is echo to display lay line of the text.
So let's get started.
Each time we type a command and press, the Enter Key Bash performs several substitutions upon the text
before it carries out our command.
So we have seen a couple of cases of how a simple character sequence, for example, these asterisks
can have a lot of meaning on the shell.
So the process that makes this happen is called the expansion.
Actually, let me mention it here.
So expansion.
Expansion.
So with expansion, we enter something and it is expanded into something else before the shell acts
upon.
So to demonstrate that what we mean by this, let's look at the echo command here.
So here.
So let's look at the echo command.
So echo echo here is a shell builtin that performs a very simple task.
It prints its text arguments on a standard output.
So if you write it like that.
So echo, this is a Oxley lecture.
And here, as you can see here, we write it it this is Oxley lecture.
So that's pretty straightforward, right?
So any argument passed to Echo gets displayed.
So let's try another example here.
So clear echo this here asterisk.
And as you can see, we've created this.
So.
For example.
Eko.
Eko, LZ.
LZ.
And here we can also write it like that.
And as you can see here, each argument we write in Echo, we are just seeing it.
So.
Here.
Let's write the term expansion and learn more about it.
So the mechanism by which wild cards work is called the Pathname expansion.
If we try some of the techniques that we employed in earlier lectures, we will see that they are really
expansions.
So given a home directory that looks like, for example, LZ and oops, actual CD here and here echo
here.
And as you can see here, we've created our like LZ here so clear.
And let's echo D here and here.
As you can see here, we started the arguments.
So.
We can also do it like that.
For example, Echo is here, and as you can see here, we will print that.
Uh, templates or documents that ends with s character.
We can also do it like that.
Echo two here, braces like that and upper, upper and here like that.
And after the asterisk here and as you can see here, we printed all of that, that starts with the
uppercase character.
And we can also do it like that, for example, Echo.
That's actually that's pretty complex and straightforward comments with with which you will learn all
of the echo commands in this course.
So Echo, for example, user asterisk, wildcard operator, some called asterisk, some called wildcard
here share.
And as you can see here, we printed our user local share.
So that is called the Pathname expansion of a hidden files.
So as we know, files that begin with a period, characters are hidden.
So a pathname expansion also respects this behavior and expansion such as this here echo this asterisk.
This will not reveal hidden files.
So it might appear at first glance that we could include hidden files in an expansion, for example,
like this that starts with this, uh, by starting a pattern with a leading period like this.
And as you can see here, we got it.
But it almost works.
However, if we examine the results closely, we will see that the names from that starts with dot and
double.
That here will also appear in the results because these names refer to the current working directory
and its parent directory.
Using this pattern will include will likely produce an incorrect result.
So we can see this if we try this command here.
Clear.
Oops, clear.
And here we will list the and wildcard operator.
After that we will use pipes and less here.
And as you can see here, we got this our desired results here.
So actually, let's end this.
Oops.
Here.
Oh, can we change this color?
I didn't realize that we can change the color of this.
Here.
Yeah.
Let's.
Quit.
So whatever here.
Now we're going to use this echo and echo dot.
Braces.
And here asterisk.
And as you can see here, the event not found.
We got an error here.
So this pattern here, echo and as you can see here, this.
So this pattern expands into every file name that begins with only one, followed by another characters.
So this will work correctly with most hidden files.
So it will it will not include file names with multiple leading periods and the LS command.
With this a option uppercase.
A option will print this to print that.
Uh, so.
And we will.
And as you can see, we got an correct listing of a hidden files.
So I'm waiting you in next lecture.