rm -f link.log #remove the old link.log file.the original link data stored in the file link.log file.

rm -f link    #remove the old link file.the result data file.
wget ftp://134.98.43.53/f:/ddn/link.log # download the newer file link.log
egrep '^N[1,2,7]C|^D[1-4]N[1,2,7]C' link.log >>link  #get the line that present the link status.
egrep -c '^N[1,2,7]C|^D[1-4]N[1,2,7]C' link.log >>link # get the numbet of the link.
egrep -v 'ACT/UP' link >>link # get the link that does not act/up
 
awk 'length($1)<6{print $10} length($1)>6{print $9}' link >>link  #get the data that present the usage of the link.
 
ls -l link.log >>link
grep 'Last login' link.log>>link
gedit link