-
-
Notifications
You must be signed in to change notification settings - Fork 125
Description
Some my files has a name with $'\n' inside the name of the files (and others files has name of other ASCII control characters). Thusly, --file-list is incompatible with my file list (but good idea nonetheless to other users & normal users! ;)
I propose --file-list0=<file> option addition. He functions identical to --file-list=<file> option except for the utilization of NUL byte line deliminations (like -z of GNU sort, -z of GNU sed, etc)
This would be a large help to my workflow, Where I encounter many cursed names of files during normal operations.
Example using:
$ find . -type f -print0 | sed -z 's/\.txt$/.txt.bak/' | rhash --bsd --md5 --file-list0=-
MD5 (empty_file.txt.bak) = d41d8cd98f00b204e9800998ecf8427e
\MD5 (project/weird\nname.img) = 1e9a59cec2f1cc108e8faab44a1acc98
Currently he works when reading weird name file from cmdline, But the SFV comment behavior is incorrect (naturally he semifail check):
$ rhash project/w*
; Generated by RHash v1.4.6 on 2025-11-16 at 00:15.35
; Written by Kravchenko Aleksey (Akademgorodok) - http://rhash.sf.net/
;
; 0 00:15.24 2025-11-16 project/weird
name.img
\project/weird\nname.img 00000000
$ rhash project/w* | rhash -c -
--( Verifying (stdin) )---------------------------------------------------------
(stdin):5: can't parse line "name.img"
\project/weird\nname.img OK
--------------------------------------------------------------------------------
Errors Occurred: Errors:1 Miss:0 Success:1 Total:2
I am not the programmer, Thus I am sad to not able contribute in code. I can only testings and bug reports.