Question

Here is your chance to be creative. Craft your own shell script that has 6 different...

Here is your chance to be creative. Craft your own shell script that has 6 different actions. For example, listing the current directory would be one, displaying the date to STDOUT would be a second. You do not get to use those examples, so make up your own.

Copy your script here and submit a screenshot of the executed script from a terminal window.

Homework Answers

Answer #1
# mkdir for making new directory
mkdir newdir

# cd for changing directory
cd newdir

# pwd for printing current working directory
pwd

# touch for creating a newfile
touch newfile

# echo with redirection
echo This is a new file > newfile

# grep to search keyword 'new' in newfile
grep new newfile

The above script performs six of the most basic operations in shell. These are:

1. mkdir for making new directory

2. cd for changing directory

3. pwd for printing current working directory

4. touch for creating a newfile

5. echo with redirection

6. grep to search pattern in a file

Output screenshot:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
The first script you need to write is login.sh, a simple script that you might run...
The first script you need to write is login.sh, a simple script that you might run when you first log in to a machine. We'll expand this script later, but for now it should include your name, username, hostname, current directory, and the current time. Here is some sample output to help guide you. Note that the bolded lines that start with "[user@localhost ~]$" are the terminal prompts where you type in a command, not part of the script. Of...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
Lab 6: Taxonomy INSTRUCTIONS: ·      On your own and without assistance, complete this Lab 6 Answer Sheetelectronically...
Lab 6: Taxonomy INSTRUCTIONS: ·      On your own and without assistance, complete this Lab 6 Answer Sheetelectronically and submit it via the Assignments Folderby the date listed in the Course Schedule(under Syllabus). ·      To conduct your laboratory exercises, use the Laboratory Manual located under Course Content. Read the introduction and the directions for each exercise/experiment carefully before completing the exercises/experiments and answering the questions. ·      Save your Lab 6 Answer Sheetin the following format:  LastName_Lab6 (e.g., Smith_Lab6). ·     You should submit your document as a...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From the April 2004 Issue Save Share 8.95 In 1991, Progressive Insurance, an automobile insurer based in Mayfield Village, Ohio, had approximately $1.3 billion in sales. By 2002, that figure had grown to $9.5 billion. What fashionable strategies did Progressive employ to achieve sevenfold growth in just over a decade? Was it positioned in a high-growth industry? Hardly. Auto insurance is a mature, 100-year-old industry...
Please read the article and answear about questions. Determining the Value of the Business After you...
Please read the article and answear about questions. Determining the Value of the Business After you have completed a thorough and exacting investigation, you need to analyze all the infor- mation you have gathered. This is the time to consult with your business, financial, and legal advis- ers to arrive at an estimate of the value of the business. Outside advisers are impartial and are more likely to see the bad things about the business than are you. You should...
There are two reflective essays from MED students during their third year internal medicine clerkship. One...
There are two reflective essays from MED students during their third year internal medicine clerkship. One student sees each connection to a patient as like the individual brush strokes of an artist and the other sees gratitude in a patient with an incurable illness and is moved to gratitude in her own life. (WORD COUNT 500) Reflect on both essays and then choose one and describe how the student grew from the experience. Then explain what you learned as a...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT