All right welcome back.
So in this video we're going to learn how to edit files inside of get bashed.
So let's open up get bash and let's do s.t. through the C drive I'm the US and I'm going to do C.D.
users and then I'm gonna change the directory to my main user account which is learn talk plus do the
same on yours.
Ok then I'm going to go to the desktop and I'm going to go to C D 0 1 and hit tab.
Then I'll do Alice.
OK.
So now this is the fun part.
This is actually my favorite part of using get Bash over any other program.
And so what I want you to do before we edit anything I want to remove a couple.
So we're going to remove sampled eye contact remove sample that PD f remove sample that P P T X remove
sample that PTSD and remove sample that pub came the clear that do Alice.
And now we're down to two files so we have a text file and we have a document file.
So the first one I want to add is the DOCS file and see if this works.
Something to do nano sample that docs and I just typed in the wrong thing.
Hold on.
Let's try it again.
Nano sample that the O C X this is some text.
Let's see if it works.
I mean do control X and then Y for yes hit enter and you open sample deal see X didn't work that's fine
let's do exit and now we're gonna go inside of the sample folder and double click and open that up and
I'm getting a bunch of errors it's shown in my other screen but it did not work.
And the reason why it doesn't work is it doesn't format correctly so that's OK.
So let's delete this file and I'm going to right click on my word program here I'm gonna open up a blank
document if you don't have a word that's OK I'm just gonna do this is some text.
Let's see if this works.
Save it.
And what am I to do is I must say this to the desktop and then we're going to move it actually going
to save it inside a sample and we'll just call this sample.
I might close it out and then what I'm going to do is go to get bash and I'm going to do Alice just
to make sure we're in the right spot which we're not.
So I'm going to move over and then we're going to do users and I'll do change learn tack plus I last
change to desktop and I'll do see these are one and then we're gonna do Elyse nano sample that d o c
x and there you go.
And this is why it doesn't work because when a word document is created it uses a bunch of mumbo jumbo
here which is code and that's how they format it.
That's why you're not able to edit it here which is fine.
So we're gonna do exit so we'll do control X and then type an N for no.
And then gonna remove the.
So let's arm sample the DRC X okay we'll clear it.
I do.
Alas.
Now you can see all we have left the sample.
So let's do nano sample that he X T and we're gonna do this is text and this is really fun to mess with.
OK.
Control x.
Yes.
Enter.
That's it.
I'm going to shrink this down a little bit down to size.
There we go.
And then I'll open up sample and there you go.
So it does pop up here and it works like it's supposed to.
Now if you're doing web development let's do this.
Touch index that HMO and we're gonna do nano index that HMO.
OK.
So if you're doing web development this is fun because you can do Doc type HMO and then I can do HD
him all I can do a head tag title tag
close the hashtag
body tag
and then close all the aged him out hug.
My friend Mario and what that does is.
This is my webpage.
Control x y.
Enter and we can do open index.
Timo.
Then work.
It does work empower shoulder.
And then if I open that up.
This is my webpage so I can edit certain documents in get bashed but it has to be a text document.
It has to be that format because even word does not allow you to do it.
So some some things that you still need to use the graphical interface for but others you can sneak
away with and use get Bash.
Now I'll show you one more we're gonna do.
Touch me and CSX open are actually nano man that CSX and I can do this too.
Body background blue and then we'll close it.
Control X and then Y enter a go.
And if I open that an opens and notepad but it shows I added this code to this page without even opening
it up in a text editor.
So if you are learning web development and you don't want to spend money on a text editor don't get
bash and start typing H2 on CSX without any help.
This is a great way to learn a great way to learn and I was more for the graphical interface before
I learned.
I actually learned a term which is like a simulator of terminal on Mac and then I started learning get
bashed because it's the same thing but it's for Windows.
And basically what it's for is is forget hub you're running get command so you can push and pull repositories
or projects to get hub.
Okay.
That's why I started learning this in the first place was for web development but I've used it for other
things as well because since I know the commands and makes it really easy to do things so what am I
to do is we're going to add to our Get bash commands.
So we're gonna do.
Edit file and we're gonna do nano file name dot extension
control asked to save that.
So that's all I have for this section of the course.
I really appreciate you checking this out and I will see in the next video where we're gonna do the
project.
Thanks for watching.