In: Computer Science
a) Using vi (or from your favorite editor) create a file called myscript. Enter the following text into the myscript file.
#!/bin/bash
echo -e "this is a sample shell script. \t It displays mounted filesystems \a"
mount
b) Now, save the file and quit the editor.
c) type ls -l myscript and hit enter. What permissions do you have on the file?
d) type bash myscript and hit enter. What did it do?
e) what does the \t and \a sequences do?
PART 2
a) Create your own BASH script that uses 3 different action
type ls -l myscript.sh and hit enter. What permissions do you have on the file?
it have read and write permission
type bash myscript.sh and hit enter. What did it do?
what does the \t and \a sequences do?
\t (horizontal tab) :- it is tab space will create spcae of 5 in right side
\a (audible bell):- A beep type that alert the user about execution of script.
Create your own BASH script that uses 3 different action
Here we create the script with different action
after running above script
Make sure to hit the like button if you find this helpful for you THANK YOU AND HAPPY LEARNING!!