QuestionQ8

Basic Unix Skills

Which command emails the contents of the myconfigfile file to [email protected]?

  • A cat myconfigfile | mail [email protected]
  • B cat myconfigfile > [email protected]
  • C mail [email protected] | cat myconfigfile
  • D mail [email protected] > cat myconfigfile
  • E mail myconfigfile -r [email protected]
Explanation

cat myconfigfile | mail [email protected] passes the file's contents through standard input to mail, which uses that input as the email message body and sends it to the specified recipient.

Community Discussion

No comments yet. Be the first to start the discussion!