Question

In: Computer Science

a) Using vi (or from your favorite editor) create a file called myscript. Enter the following...

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

Solutions

Expert Solution

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!!


Related Solutions

Use Vi text editor or ATOM to create a bash script file. Use the file name...
Use Vi text editor or ATOM to create a bash script file. Use the file name ayaan.sh. The script when ran it will execute the following commands all at once as script. Test your script file make sure it works. Here is the list of actions the script will do: It will create the following directory structure data2/new2/mondaynews off your home directory. inside the mondaynews, create 4 files sports.txt, baseball.txt, file1.txt and file2.txt. Make sure file1.txt and file2.txt are hidden...
In linux , Using a simple text editor, create a text file with the following name...
In linux , Using a simple text editor, create a text file with the following name "Test" and content: GNU GENERAL PUBLIC LICENSE The GNU General Public License is a free, copy left license for the GNU General Public License is intended to guarantee your freedom to GNU General Public License for most of our software; it applies … 2-Write the command to create the text file. 3-Print the file permissions. 4-Create a directory named "361" 5-Copy file "Test" to...
1. Create a local file on your hard drive by using the NotePad editor that comes...
1. Create a local file on your hard drive by using the NotePad editor that comes with Windows or TextEdit on the MAC. Type into this file some remarks stating that you understand the FTP process. 2. Save it with the name "assign3.txt" 3. Start the FTP program. (SSH for Windows OR FileZilla for MAC) 4. Log on to electron.cs.uwindsor.ca server how do i do this on a mac computer It is intro to internet class
This assignment includes the creation of a text document using Vi Editor and changing permissions to...
This assignment includes the creation of a text document using Vi Editor and changing permissions to access the new file. Use Vi Editor to create a text document Add data to your text file Save your text file Exit Vi Editor Display the contents of your file using the following tools: cat head tail Set file permissions as listed below User – RWX Group – RWX Other – RWX Use a GUI tool to display the new file in your...
Using Python create a script called create_notes_drs.py. In the file, define and call a function called...
Using Python create a script called create_notes_drs.py. In the file, define and call a function called main that does the following: Creates a directory called CyberSecurity-Notes in the current working directory Within the CyberSecurity-Notes directory, creates 24 sub-directories (sub-folders), called Week 1, Week 2, Week 3, and so on until up through Week 24 Within each week directory, create 3 sub-directories, called Day 1, Day 2, and Day 3 Bonus Challenge: Add a conditional statement to abort the script if...
5. Create an HTML file that uses an array to store links for your three favorite...
5. Create an HTML file that uses an array to store links for your three favorite websites. Use a for loop to display each link URL within an alert dialog box. I would like to see the HTML page displaying the message.
Using JAVA The following code is able to read integers from a file that is called...
Using JAVA The following code is able to read integers from a file that is called "start.ppm" onto a 3d array called "startImage". Implement the code by being able to read from another file (make up any file name) and save the data onto another 3d array lets say you call that array "finalImage". The purpose of this will be to add both arrays and then get the average Save the average onto a separte 3darray,lets say you call it...
Create a basic VI by using labVIEW software. Kindly share screenshot of basic VI
Create a basic VI by using labVIEW software. Kindly share screenshot of basic VI
Using Python Shell 2.7, create a file called Assignment6_1.py Create an array based on a basic...
Using Python Shell 2.7, create a file called Assignment6_1.py Create an array based on a basic array Create a for loop that will print the array index the array, print out the index append an element to the array, print out the array insert an element into the array, print out the array pop an element from the array, print out the array remove an element from the array, print out the array reverse the order of the array, print...
Linux Use touch to create a file in your working directory called PutFileHere this is a...
Linux Use touch to create a file in your working directory called PutFileHere this is a linux question i acidentally put javascript when i first submitted it
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT