Table of Contents
Beginning Linux Programming, Second Edition.............................................................................................1Foreword..............................................................................................................................................................5Introduction.........................................................................................................................................................6
Welcome.................................................................................................................................................6Who's this Book For?..............................................................................................................................6What's Covered in the Book...................................................................................................................6What You Need to Use this Book...........................................................................................................8Source Code............................................................................................................................................9Conventions............................................................................................................................................9Tell Us What You Think.......................................................................................................................10Why Should I Return the Reply Card?.................................................................................................10
Chapter 1: Getting Started.............................................................................................................................11
Overview...............................................................................................................................................11What is UNIX?.....................................................................................................................................11What is Linux?......................................................................................................................................11Distributions..........................................................................................................................................11The GNU Project and the Free Software Foundation...........................................................................12Programming Linux..............................................................................................................................13UNIX Programs....................................................................................................................................13The C Compiler..............................................................................................................................14Try It Out − Our First UNIX C Program........................................................................................14How It Works..................................................................................................................................15Getting Help..........................................................................................................................................15Try It Out − Manual Pages and info................................................................................................16Development System Roadmap............................................................................................................17Programs.........................................................................................................................................17Header Files....................................................................................................................................18Library Files...................................................................................................................................19Static Libraries...............................................................................................................................19Try It Out − Static Libraries............................................................................................................20Shared Libraries.............................................................................................................................22UNIX Philosophy.................................................................................................................................23Simplicity.......................................................................................................................................23Focus..............................................................................................................................................23Reusable Components....................................................................................................................23Filters..............................................................................................................................................23Open File Formats..........................................................................................................................23Flexibility.......................................................................................................................................23Summary...............................................................................................................................................24
Chapter 2: Shell Programming.......................................................................................................................25
Overview...............................................................................................................................................25What is a Shell?....................................................................................................................................26Pipes and Redirection...........................................................................................................................27Redirecting Output.........................................................................................................................27Redirecting Input............................................................................................................................28Pipes...............................................................................................................................................28
i