Is there any easy way to implement the copy to clipboard option from the output of a shell script ?
You can use the xclip command.
xclip
echo hello | xclip
Instructions for obtaining xclip are here.