Write a function that takes a single filename as an argument and adds execute permission to the file for the user.
a. When might such a function be useful?
b. Revise the script so it takes one or more filenames as arguments and adds
execute permission for the user for each file argument.
c. What can you do to make the function available every time you log in
Suppose that, in addition to having the function available on subsequent
login sessions, you want to make the function available in your current
shell. How would you do so??
$ function perms () {
> chmod u+x $1
> }
a. When you are writing many shell scripts, it can be tedious to give many
chmod commands. This function speeds up the process.
b. $ function perms () {
> chmod u+x $*
> }
c. Put the function in ~/.bash_profile and/or ~/.bashrc to make it available
each time you log in (using bash).
d. Use source to execute the file you put the function in. For example:
$ source ~/.bash_profile
You might also like to view...
The keyword __________ is required to declare a class.
a. public b. private c. class d. All of the above.
The default option in the Macro Settings is to "disable all macros with notification."
Indicate whether the statement is true or false
The symbols used to denote basic mathematical operations are called ________ operators
Fill in the blank(s) with correct word
Briefly describe what is meant by encapsulation.
What will be an ideal response?