openbatfilesmac This is a topic that many people are looking for. saibabalinks.org is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, saibabalinks.org would like to introduce to you Bash Script Video Tutorial on a Mac – chmod explained and how to make it executable. Following along are instructions in the video below:
“So what i m going to do is show you how to make a bash bash script on a mac. And then how to make executable. So. The first thing want to do is bring up textedit so bring it up through spotlight.
Mm hmm. Now. I m going to make a bash script. So we need to start with the standard commands so we do opt.
3. Which is the way you get a hash symbol on mac exclamation. Mark bin forward slash bash and then we ll just do the most basic of commands..
We ll do hello from got a letter technology g. Ok. Now as you can see here. It is and we ve got the formatting options here we don t want those we just want to make it plain text.
We don t want to save anything outside of the script with along with it so go to file choose save as ok we don t want to save it as a text file at all we just want to save it where we ll call it turn to my first script ok and we ll save it to my my home folder click save ok so if we go down to finder. We can see there we go. There s our first script ok now one of those i m going to get the info on it ok and let s look at the permissions because permissions are very important when you re making an executable command. Now what this has at the moment is it has rewrite permissions for myself.
And read only for everybody else what it doesn t have is executable permissions. So what we want to do is we want to set that to executable now. I you cannot change the executable..
There s no option here. We ve just got read write and read only we don t have executable here. So in order to do that we re going to have to go into the terminal. So using spotlight again of the terminal.
Okay and we will what do we call. It first script so we ll go list and i want to see the permission. So the l. And we ll type in first script.
Okay so here we go so. This is basically showing us again. What we saw in permissions from the get info command..
Okay. The third ignoring. The first one we ve got them in groups of three so we ve got read write we want an execute. There and then groups have got read write.
I ve got read only so read and everyone has got read only so read no rights no execute okay so what we ll do is we re going to change that now the easiest way so we use the check the chmod command. Okay and if we use the number 700 that will give us read write execute for myself. Only and it will set the it will set the permissions for the other ones for no read no right for the other groups and everybody else and then we say the name of the script. We want to change now.
I m just going to move this so we can just see the script just above. It okay. So i m chmod number 700..
First script just going to hit return and do we see that in the background. There the script has changed and we can now see its executable okay so now if i now type first script. I get the command not found because it s looking in the bash folder for it. So.
What i have to do is i have to tell it to search in the local folder folder. We re in which is that come out there and now i can type in first script and we get hello from garlow technology. So that is how you create a bash script. ” .
Thank you for watching all the articles on the topic Bash Script Video Tutorial on a Mac – chmod explained and how to make it executable. All shares of saibabalinks.org are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.