Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(Linux Bash Scripting Question Regarding File Hashing) There are 5 files named: filehash1.txt, filehash2.txt, filehash3.txt, filehash4.txt and filehashoutput.txt . They have the following hash values:
(Linux Bash Scripting Question Regarding File Hashing)
There are 5 files named: filehash1.txt, filehash2.txt, filehash3.txt, filehash4.txt and filehashoutput.txt. They have the following hash values:
The output of filehash3.txt matches the hash value in file filehashoutput.txt.
Kindly create a script called hash.sh that will determine which of the above four (4) filehash#.txt files matches the hash in filehashoutput.txt.
Note: The contents of filehashoutput.txt is the result of sha512sum being run on the matching file with the file name removed.
$ sha512sum filehashi.txt f64f2f203f4065af8c924ceablb4a65c5b3b3b301f4b665a4d744b6dla995d84bdffc8a62a75ed8e24b8a69d5a36283212 6458d67e3d37ff9501d807a898479e filehashi.txt 7$ sha512 sum filehash2.txt Ocbcfd6lafc7c45c3d45536befb05998ff1d946788415d5d2de9dle2effb439517bb973fd7ecb662af2dbb3b6abed4ec77 Ofc80575eb505769bb794c30b7c273 filehash2.txt $ sha512sum filehash3.txt 835be74b0e50c32ac689ed1683bc69a3801c79fd52c2e56c94ac030676f0908a330fbc3a38760e703ed3fe073b906f5b2e bed51c860b2c4f897a81e483726968 filehash3.txt $ sha512 sum filehash4.txt cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63 b931bd47417a81a538327af927da3e filehash4.txt $ cat filehashoutput.txt 835be74b0e50c32ac689ed1683bc69a3801c79fd52c2e56c94ac030676f0908a330fbc3a38760e703ed3fe073b906f5b2e bed51c860b2c4f897a81e483726968
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