Add command/operation 'genlink'
Remove duplicate code; consolidate link-print in 'init' and 'genlink'