Thanks rdrtx1 and Corona688! Now I think I get the whole picture of the script.
If go back to my original question, the command ($RANDOM|md5sum) was not embedded in the sed substitution part. And my code
sed 's/^$/'">$(date | md5sum)"'/g'
is not dynamic which does not count either. I read some of the post about embedding cmd in AWK script. Is that possible for SED too, say embeding a perl script in it to make it work? Thanks again!
You cannot embed commands inside a sed expression and expect sed to execute them itself. If you manage to get them executed at all, it will be the shell that executes them, and only once, before sed runs.
I could probably cook up what you wanted in awk, if I knew what you wanted. Perl is overkill in most cases.
Thanks Corona!
What I want is to replace all the blank rows with different unique strings to match the different sequences of every other row. The one rdrtx1 posted worked well except the replacement is not unique to each other, which is believed from the part:
echo $RANDOM|md5sum
Please post your awk script, if you can. Thanks a lot!