When should I put this command?
chmod +x script.sh
In my script.sh file or in my whatever-code-I-wrote-that-need-it file (I will later refer to as code_file)?
If in my code_file, is this how to use it? (I wrote it according to my understand at this moment.)
#inside a code file #file name: code_file chmod +x script.sh #insert code
#type this code in terminal chmod +x script.sh #before I run my code file
I don’t understand how is “bash scripting” differ from “bash profile”. I mean they both store user’s frequently use commands and help user shorten their commands when they have to use the same things repeatedly.
Does bash scripting is a new file recommended to user to create or does the file have already exist in our system waiting for us to make change?
What are some examples of when to use bash scripting vs bash profile? Including creating the environment. In my head I kinda get the concept, but I still can’t quite able to come up with a solid example to myself. When I think this concept should apply for bash scripting for one moment, another moment I came up with something different which may or may not relate to my previous understanding. Some can explain one functionality of one way to use it, but not enough to explain the whole things.
Relate to question 4, but talk about how would it be different in each OS, mac, linux (in general since it has many distros and each one is kinda unique), windows.
I would really appreciate your clarification.