Hi Folks (esp. @Kem Tekinay ),
Basically, I need to add a second space in the md5 -r output of a file list. So I’m trying like this:
md5 -r $file 2>/dev/null | sed s/s/^.\\/\\{32\\}\\\\s/\\$0 /g
However, i just get back the unmodified line from the md5 output.
I have the following regex search / replace that works in Xojo (and RegExRx agrees), but I need to use it in a shell script with sed.
In RegExRx, the following does exactly what I expect:
search pattern: '^./{32]\\s'
replace pattern: '$0 '
ticks are just to delineate the entire patterns and the md5 value is always 32 characters
Example md5 output that I need to modify
fccc435755462f9c681e4cfa365d67c6 QuickArchiveDemo-20150504.144505.bru
e9d7901c1d3198d6d716407bfd0195ae QuickArchiveDemo-20150504.145527.bru
257a2c22bb0b3841219535bf5d738196 SetFile.zip
7d4fadae44e7000ef1fe8a70f76c904c TGIntro.mov
85c4716a963233dba97ebb5e776ad7a6 TGIntro.mp4
a83e800c69ffff043272f394a705385a archtime
794db038d6161babda0b8f473f0a1ae1 execbru.class
As I show above, I’ve tried
sed s/^.\\/\\{32\\}\\\\s/\\$0 /g
but it results in no change in the line or a bad substitution error depending on how I manipulate the escaping backslashes.
Anyone have an idea?