This is where I am stuck...I need to sed replace some static values with those random characters, but I need each replacement to have *different* random characters...for example:
sed -i 's/blah/blah?$randomize/g' /home/test.html
^ Above does not work ... but it would replace all occurrences of "blah" with blah?au2bu and blah?d2g3h and blah?3juh4 ... I don't want them to all be blah?au2bu
Thank you for that, but it seems a bit complicated...
This is working atm...
# Random character generator
randomizer()
{
randomize=`cat /dev/urandom | tr -dc "a-z0-9" | fold -w 6 | head -n 1`
result=$randomize
}
randomizer
echo $result
randomizer
echo $result
But I have to keep calling randomizer in order to make it get a fresh result and also when I call sed with $result, it makes all replacements the same rather than unique $result