Question

This is unix tools and scripting. For all of these questions, you may NOT use: grep,...

This is unix tools and scripting. For all of these questions, you may NOT use: grep, sed, awk, or per if, for, while, until, case, or read.

For each of the following commands, state:
   i) which program opens and reads the input file, and
   ii) how shasum receives the file's contents.

   a)   shasum Meditations.txt
       i)
       ii)
   b)   cat Meditations.txt | shasum
       i)
       ii)
   c)    shasum < Meditations.txt
       i)
       ii)

Your efforts are appreciated. Thank you very much !

*update* example about shasum in following :

Give a command to replace all of the capital X characters with lower case x characters in the books corpus. [e]

   cat * | tr 'X' 'x' | shasum
   e424cc5e4fae61474f7a7622b2daeb2340999602 -

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) shasum Meditations.txt

-> This command will read the file in text mode and print the SHA checksums

-> This command will print the file name along with the checksums. Format: [ checksum   filename ]

b) cat Meditations.txt | shasum

-> This command will read the content of the file using cat command and print the SHA checksums of the file content

-> This command does not print the filename along with the checksums. Format: [ checksum   - ]

c) shasum < Meditations.txt

-> This command will also print the SHA checksums of the file contents

-> This command does not print the filename along with the checksums. Format: [ checksum   - ]

Replace all of the capital X characters with lower case x characters.

-> cat book_corpus.txt | tr 'X' 'x' | shasum

Here the book is saved as a file in book_corpus.txt

Add a comment
Know the answer?
Add Answer to:
This is unix tools and scripting. For all of these questions, you may NOT use: grep,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A....

    QUESTION 1 What will be the output of following Unix command: find / -name ‘*’ A. List all files and directories recursively starting from / B. List a file names * in / C. List all files in / directory D. List all files and directories in / directory QUESTION 2 Which command is used to extract a column/field from a text file / input. A. paste B. get C. cut D. tar QUESTION 3 Which command creates an empty...

  • Hello all, I have a c++/unix (bash) question. I am struggling on starting this assignment. If...

    Hello all, I have a c++/unix (bash) question. I am struggling on starting this assignment. If you could start the assignment and tell me how to do the rest it would be greatly appreciated! (Quick thumbs up answer response if thorough and correct) Maintain automobile records in a database Write a shell script to create, view and modify a simple database that contains automobile records. The shell script has to be done in Bourne shell syntax (bash as a matter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT