The following script is pretty simple, and has very limited functionality, however is a good example of how to send information to your clipboard assuming you are using your linux installation as a desktop.
So what does the script do? It display’s your internal, and external IP address, then copy’s the internal IP to your clip board so that you can easily paste it. Enough said, here it is:
[bash]#!/bin/bash
# Place local IP address into a variable
LIP=`ifconfig eth0 | grep "inet addr:" | cut -d’:’ -f2,4 | sed ‘s/.+Bcast:/\//g’ | awk -F"Bcast:" ‘{print $1}’`
# Place external IP into a variable
WIP=`curl -s http://linux-servers.net/ip.php`
# display the IP’s
echo "LOCAL IP: ${LIP}"
echo "WAN IP: ${WIP}"
# send local IP to clip board
echo ${LIP} | xsel -i[/bash]