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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started