and apologies for the newb question. I'm writing a perl script to check an MD5SUM against itself before running. Think of it as a "do not change the script check". I've managed to get the FCIV binary to calculate the MD5SUM, but there is no way to obtain just the MD5SUM as a single string output.
It spews the following to the console:
# //
# // File Checksum Integrity Verifier version 2.05.
# //
# 3e593beb3bb51a23f5a2ccae0f2c70a3 perlscript.pl
I want to procress this multi line string, capturing just the md5sum. I'm presuming the best way to do this would be with a substitution regular expression. Unfortunately though but I'm having problems with the string being over multiple lines, it emptys the whole thing.
1) Is there a better way to process this output other than a regex? 2) If we are using a regex, what would you suggest?
This is what I'm trying to us:
$md5val =~s /(\/\/[.])*\n//;
I'm pretty new to all this, to any comments are appreciated. Thanks in advance.