• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home » Resolved: Bash String Comparison sha256sum

Resolved: Bash String Comparison sha256sum

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I am trying to compare the hash of a copied file with bash but the condition is not working.

Answer:

The condition fails, because the resulting strings are actually not the same. You need to cut out the hash by using the cut command.
  • -d specifies the delimiter. In this case we use a single space
  • -f1 selects the field of the output. Here we want to only have the first field, which is the hash

If you have better answer, please add a comment about this, thank you!

bash cryptography linux sha256
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Modify entity using Action in C#

24/03/2023

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Resolved: Passing 2 functions in onChange in react

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.