Your best bet is probably to use the -shortoutput=1 option for multichaind – this causes it to output a single line containing your blockchain address (if connection failed) or node address (if succeeded). You can tell the difference by search for the @ sign in the output.
There is no current easy way to extract the address from the wallet.dat file directly without multichaind, but you could search online for methods people have used to do this with Bitcoin Core, and adapt them for MultiChain.