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
Write the steps to use the vi editor command to create myfile. Insert the following lines...
Write the steps to use the vi editor command to create myfile. Insert the following lines of text save and display the result to STDOUT with cat command. line 5 line 6 line 3 line 2
Using a text editor, create a file english.txt containing the following words: yes no go come...
Using a text editor, create a file english.txt containing the following words: yes no go come thanks goodbye Create a second file chinese.txt contain the following words: shi bu qu lai xiexie zaijian Write a program that reads the words from english.txt so that the successive slots of a char * array english point to them. Use the %s conversion code in a fscanf call to read one word at a time. Similarly, read the words from chinese.txt so that...
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.
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 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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT