I have the below command that produces a SHA256 hash string that I am using within a FOR IN loop with Batch. I've noticed that differences in versions of the certutils results in some outputs being segmented with spaces "ab 7e eg et cc..." instead of a continuous string. I'm looking for a way to update my script to remove the spaces within an additional pipe operation. SED unfortunately does not work natively within Batch and is outside my scope for this.
CertUtil -hashfile SomeFile.txt sha256 | findstr /v "hash" | sed s/ *//g
I've tried using the set str=%str: =%
however I haven't gotten the syntax to work properly within my larger script. I am hoping to work within an additional pipe operator step instead of including variables if at all possible.