UNIX编程环境(英文版)

978-7-115-30243-4
作者: 【美】Brian W. Kernighan Rob Pike
译者:
编辑: 汪振

图书目录:

CONTENTS

1. UNIX for Beginners 1

1.1 Getting started 2

1.2 Day-to-day use: files and common commands 11

1.3 More about files: directories 21

1.4 The shell 26

1.5 The rest of the UNIX system 38

2. The File System 41

2.1 The basics of files 41

2.2 What's in a file? 46

2.3 Directories and filenames 48

2.4 Permissions 52

2.5 Inodes 57

2.6 The directory hierarchy 63

2.7 Devices 65

3. Using the Shell 71

3.1 Command line structure 71

3.2 Metacharacters 74

3.3 Creating new commands 80

3.4 Command arguments and parameters 82

3.5 Program output as arguments 86

3.6 Shell variables 88

3.7 More on I/O redirection 92

3.8 Looping in shell programs 94

3.9 bundle: putting it all together 97

3.10 Why a programmable shell? 99

4. Filters 101

4.1 The grep family 102

4.2 Other filters 106

4.3 The stream editor sed 108

4.4 The awk pattern scanning and processing language 114

4.5 Good files and good filters 130

5. Shell Programming 133

5.1 Customizing the cal command 133

5.2 Which command is which? 138

5.3 while and until loops: watching for things 144

5.4 Traps: catching interrupts 150

5.5 Replacing a file: overwrite 152

5.6 zap: killing processes by name 156

5.7 The pick command: blanks vs. arguments 159

5.8 The news command: community service messages 162

5.9 get and put: tracking file changes 165

5.10 A look back 169

6. Programming with Standard I/O 171

6.1 Standard input and output: vis 172

6.2 Program arguments: vis version 2 174

6.3 File access: vis version 3 176

6.4 A screen-at-a-time printer: p 180

6.5 An example: pick 186

6.6 On bugs and debugging 187

6.7 An example: zap 190

6.8 An interactive file comparison program: idiff 192

6.9 Accessing the environment 199

7. UNIX System Calls 201

7.1 Low-level I/O 201

7.2 File system: directories 208

7.3 File system: inodes 214

7.4 Processes 220

7.5 Signals and interrupts 225

8. Program Development 233

8.1 Stage 1: A four-function calculator 234

8.2 Stage 2: Variables and error recovery 242

8.3 Stage 3: Arbitrary variable names; built-in functions 245

8.4 Stage 4: Compilation into a machine 258

8.5 Stage 5: Control flow and relational operators 266

8.6 Stage 6: Functions and procedures; input/output 273

8.7 Performance evaluation 284

8.8 A look back 286

9. Document Preparation 289

9.1 The ms macro package 290

9.2 The troff level 297

9.3 The tbl and eqn preprocessors 301

9.4 The manual page 308

9.5 Other document preparation tools 313

10. Epilog 315

Appendix 1: Editor Summary 319

Appendix 2: hoc Manual 329

Appendix 3: hoc Listing 335

Index 349

详情

本书通过读、写、看的实际例子,帮助读者彻底理解UNIX开发环境的细节。读者将不仅能够了解如何使用UNIX系统及其组件,使用其进行开发,最重要的是能够明白其一切特征的缘由。本书内容深入浅出、实例丰富,无论是UNIX系统的初学者还是专业人员都可从本书收益。

图书摘要

相关图书

Linux常用命令自学手册
Linux常用命令自学手册
庖丁解牛Linux操作系统分析
庖丁解牛Linux操作系统分析
Linux后端开发工程实践
Linux后端开发工程实践
轻松学Linux:从Manjaro到Arch Linux
轻松学Linux:从Manjaro到Arch Linux
Linux高性能网络详解:从DPDK、RDMA到XDP
Linux高性能网络详解:从DPDK、RDMA到XDP
跟老韩学Linux架构(基础篇)
跟老韩学Linux架构(基础篇)

相关文章

相关课程