Suppose I have a variable containing several words:
list="one two three four five"
Without changing the list, write a loop that only prints the following:
one two three
Hint: write a script and test it. You may give me a whole script or just the loop.
Given I have two files in my directory file_arg1 and file_arg2, where file_arg1 is executable (has been granted executable permission with
chmod) and file_arg2 is not executable, write a script
is_executable that will give the following output:
$ ./is_executable file_arg1 file_arg1 is executable
$ ./is_executable file_arg2 file_arg2 is NOT executable
Hint: created those two files, and make one executable as we have in class. Write your script and test it on them.
Hint: use the examples in class and/or this reference