Hint: List of commands to read and use: cd, pwd, ls, echo, cat, od, quoting character and output redirection operator. Change your working directory to your login directory. A new file can be created in 4 different ways: (i) vi, (ii) touch, (iii) cp, and (iv) cat command. You have used touch and cp commands before. In this question, you will use cat command. In part II, you will use the vi text editor. Create a short file using cat command and output redirection operator > like cat > filename. The content of the file must be typed from the keyboard, which is the default standard input (stdin) device. End the input to the file by typing Ctrl d keys at the same time. Copy the file you have created to a new file. Display the content of the file you have created using one od command with appropriate option(s) for each question below: Display in character form Display in hexadecimal form Display in octal form Display in both character and octal form Using echo command, answer how the end of line (also called new line) character is displayed. NOTE: Shell gives special meaning to certain characters like *, ?, \ and others. To make shell not to give special meaning to that character, you have to put a \ in front of it.  This is called quoting character.  Therefore, you have to quote the character \ by putting a \ in front of it like \\ in order for the echo command to display it. Read more about it quoting character in your textbook.  The end of line character is the representation of the “enter” key. The ASCII character code for the “enter” key is not a displayable single character like the letter ‘X’ for example.  Hence, the system displays it differently. Using echo command, answer: (i) the ASCII number code for new line (enter key) and (ii) for any one letter in the file, display the letter and its ASCII number code. This can be done by comparing the output of the character form and the hexadecimal form above. NOTE: Do not forget to specify the number type. Search Internet for ASCII table and give the ASCII code for one letter, one special character, and one digit of your choice that are not in the file. You have to do this search on your laptop by running browser and going to site like google.com In your answer, specify whether the number is decimal or octal or hexadecimal or binary.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Hint: List of commands to read and use: cd, pwd, ls, echo, cat, od, quoting character and output redirection operator.

  • Change your working directory to your login directory.
  • A new file can be created in 4 different ways: (i) vi, (ii) touch, (iii) cp, and (iv) cat command. You have used touch and cp commands before. In this question, you will use cat command. In part II, you will use the vi text editor.
  • Create a short file using cat command and output redirection operator > like

cat > filename. The content of the file must be typed from the keyboard, which is the default standard input (stdin) device. End the input to the file by typing Ctrl d keys at the same time.

  • Copy the file you have created to a new file.
  • Display the content of the file you have created using one od command with appropriate option(s) for each question below:
    1. Display in character form
    2. Display in hexadecimal form
    3. Display in octal form
    4. Display in both character and octal form
  • Using echo command, answer how the end of line (also called new line) character is displayed. NOTE: Shell gives special meaning to certain characters like *, ?, \ and others. To make shell not to give special meaning to that character, you have to put a \ in front of it.  This is called quoting character.  Therefore, you have to quote the character \ by putting a \ in front of it like \\ in order for the echo command to display it. Read more about it quoting character in your textbook.  The end of line character is the representation of the “enter” key. The ASCII character code for the “enter” key is not a displayable single character like the letter ‘X’ for example.  Hence, the system displays it differently.
  • Using echo command, answer: (i) the ASCII number code for new line (enter key) and (ii) for any one letter in the file, display the letter and its ASCII number code. This can be done by comparing the output of the character form and the hexadecimal form above. NOTE: Do not forget to specify the number type.
  • Search Internet for ASCII table and give the ASCII code for one letter, one special character, and one digit of your choice that are not in the file. You have to do this search on your laptop by running browser and going to site like google.com

In your answer, specify whether the number is decimal or octal or hexadecimal or binary.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY