add sample code in Understanding UNIX/LINUX Programming