Linux Fundamentals Module 4 Quiz Answers

In this article i am gone to share coursera course: Linux Fundamentals by LearnQuest | Linux Fundamentals Module 4 Quiz Answers with you..

Enroll Link: Linux Fundamentals

Linux Fundamentals Module 4 Quiz Answers


 

Module 4 Quiz Answers

Question 1)
Which is the correct command to redirect STDOUT from the cat command?

  • cat file1.txt < newfile.txt
  • cat file1.txt > newfile.txt
  • cat file1.txt 2> newfile.txt

Question 2)
Which is the correct command to redirect STDERR from the cat command?

  • cat file1.txt > newfile.txt
  • cat file1.txt < newfile.txt
  • cat file1.txt 2> newfile.txt

Question 3)
Which is the correct command to redirect STDERR from the cat command and append the output to the file?

  • cat file1.txt 2> newfile.txt
  • cat file1.txt 2>> newfile.txt
  • cat file1.txt >> newfile.txt

Question 4)
What BRE would match a single character on only a single character?

  • ^
  • .
  • *
  • $

Question 5)
What BRE would match the beginning of a line?

  • .
  • *
  • ^
  • $

Question 6)
What BRE would match the end of a line?

  • .
  • *
  • ^
  • $

Question 7)
What VI keystroke allows you to enter a command?

  • :
  • .
  • $

Question 8)
If file1.txt has these three lines:

Aspen did not do his homework
Aspen did not study for the exam
Aspen failed the course

If this command is run what is the output: sed -e ‘s/Aspen/Seamus/’ file1.txt

  • Aspen did not do his homework Aspen did not study for the exam Aspen failed the course
  • Seamus did not do his homework Seamus did not study for the exam Seamus failed the course
  • seamus did not do his homework seamus did not study for the exam seamus failed the course

Question 9)
Which command will pipe the output from the cat command to the less pager?

  • cat file1 | less
  • cat file1 > less

Question 10)
Which command will send the text to the less pager and to a file?

  • cat file1.txt|tee -a file2.txt|less
  • tee file1.txt -a file2.txt|less

 

 

Leave a Comment