Question: Scripting Languages Question 1 Open any editor. Create a real simple .sh file with a statement to print Hello World on the terminal. If you

Scripting Languages

Question 1

Open any editor. Create a real simple .sh file with a statement to print Hello World on the terminal. If you were to run this script, which ones in the following permissions setup list will make the file an executable?

a- chmod 755 yourfilename

b- chmod +x yourfilename

c- chmod 300 yourfilename

d- chmod ugo=- yourfilename

question 2

Type the following commands at a terminal prompt to create a practice file

cat > Newfile.txt

The black cat was chased by the black dog.

The black cat was not chased by the black dog.

# Ctrl-D to exit the cat command and close the file Using the sed command what will you type to change the color of the dog to brown in all occurrences.

Note: Once you figure out the command, make sure to run $cat Newfile.txt

to check if the word black has been changed to brown.

question 3

Use the same file (Newfile.txt) you created in question 4 .

What command (Select all possible from the list below) will you write to create a backup of the same file (Newfile.txt) named Newfile.txt.bk?

bk -file Newfile.txt Newfile.txt.bk

cat Newfile.txt > Newfile.txt.bk

cp Newfile.txt Newfile.txt.bk

tar -f Newfile.txt Newfile.txt.bk

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!