Re: Wrong SHA1 is calculated
[email protected] Tue, 16 May 2017 21:11:22 +1000
| Newsgroups | perl.win32.vanilla |
|---|---|
| Message-ID | <284380C99C4242BE841E5D7568E03A1E@OwnerPC311012> |
>> Le 15/05/2017 à 16:30, [email protected] a écrit : >>> Unfortunately, I don't know how to get that binmode() into the >>> one-liner's angle brackets :-( >> >> $ PERLIO=unix perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>" >> secure.txt >> 19576d392b021ac25efdca6f1886b5ce5b1090c4 > > Yes, I think that should give the OP the result he was seeking. Heh ... I didn't realize (until after I had posted) that this was a bash shell solution. In the cmd shell, of course, the same command simply outputs: 'PERLIO' is not recognized as an internal or external command, operable program or batch file. Best approximation I could come up with in the cmd shell was: set PERLIO=unix && perl -MDigest::SHA1=sha1_hex -le "print sha1_hex <>" secure.txt && set PERLIO= 19576d392b021ac25efdca6f1886b5ce5b1090c4 which is not quite so nice as in bash ;-) Can my cmd shell implementation be improved upon ? Cheers, Rob