#!/bin/sh # # myfingerd -- assumed to be run under netd, e.g., netd -p 1079 -- myfingerd # read username username=`echo "$username" | sed 's/^M//'` finger "$username" | sed 's/$/^M/'where the caret-M notation in the text above denotes the control-M (carriage return) character; in the shell script, a real control-M is embedded there.
I also talked about HTTP and MIME data, and told you to telnet to port 80 (default HTTP port) of some web servers and try to request a document. Using HTTP 0.9, the request would be done as follows:
$ telnet www.ucsd.edu 80 GET / requested document (/) will be sent by the server hereUsing HTTP 1.0, the request would look like:
$ telnet www.ucsd.edu 80 GET / HTTP/1.0 Host: work.ucsd.edu:5555 Proxy-Connection: Keep-Alive User-Agent: Mozilla/3.0Gold (X11; I; Linux 2.0.27 i586) Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* requested document (/) will be sent by the server hereNote that the request ends with a blank line.
bsy@cse.ucsd.edu, last updated