#include #include #include #include #include main(argc,argv) int argc; char *argv[]; { unsigned char b; int fd, i; i=0; if (argc!=2) exit(-1); fd = open(argv[1],O_RDONLY|O_BINARY); if (fd == NULL) exit(-2); while (read(fd,&b,1) != 0) { printf("%2d %2x %3d %c\n",i++, b, b,(char) b); } }