Linux Command Line and shell script programming Daquan: Version 2nd
Basic Information
Author: (US) Blum (R.) Bresnahan. c.) [Translator's introduction]
Translator: Wu Haifeng
Series name: Turing programming Series
Press: People's post and telecommunications Press
ISBN: 9787115288899
Mounting time:
Published on: February 1, August 2012
Start: 16
Page number: 1
Version: 1-1
Category: Computer> operating system> Linux
For more information, Linux Command Line and shell script programming: Version 2nd
Introduction
Books
Computer books
Linux Command Line and shell script programming Daquan: Version 2nd is a comprehensive tutorial on Linux Command Line and shell script programming. The book consists of four parts: The first part introduces the linuxshell command line; the second part introduces the basics of shell script programming; the third part explores the Advanced content of shell script programming; the fourth section describes how to use shell scripts in a real environment. This book not only covers detailed hands-on tutorials and practical information in the real world, but also provides reference information and background information related to the content learned.
The "Linux Command Line and shell script programming Daquan: Version 2nd" provides comprehensive content, concise language, and rich examples. It is suitable for Linux system administrators and Linux enthusiasts to read the reference.
Directory
Linux Command Line and shell script programming Daquan: Version 2nd
Part 1 Linux Command Line
Chapter 2 first knowledge of Linux Shell 2
1.1 What is Linux 2
1.1.1 exploring Linux kernel 3
1.1.2 GNU tool chain 10
1.1.3 Linux Desktop Environment 11
1.2 Linux release 16
1.2.1 core Linux release 16
1.2.2 professional Linux release 17
1.2.3 Linux livecd 17
1.3 Conclusion 19
Chapter 4 go to shell 20
2.1 terminal simulation 20
2.1.1 graphic functions 21
2.1.2 keyboard 24
2.2 terminfo database 25
2.3 Linux console 28
2.4 xterm terminal 29
2.4.1 command line parameter 30
2.4.2 xterm Main Menu 31
2.4.3 VT option menu 32
2.4.4 VT font menu 34
2.5 konsole terminal 36
2.5.1 command line parameter 36
2.5.2 tagged window session 37
2.5.3 configuration file 38
2.5.4 menu bar 39
2.6 gnome terminal 43
2.6.1 command line parameter 43
2.6.2 tag 43
2.6.3 menu bar 44
2.7 conclusion 47
Chapter 2 Basic bash shell commands 48
3.1 start shell 48
3.2 shell prompt 49
3.3 bash manual 51
3.4 Browse File System 52
3.4.1 Linux File System 52
3.4.2 traverse directory 54
3.5 file and directory list 56
3.5.1 basic list function 56
3.5.2 modify output information 57
3.5.3 complete parameter list 58
3.5.4 filter output list 60
3.6 process files 61
3.6.1 Create File 61
3.6.2 copy file 61
3.6.3 link file 63
3.6.4 rename a file 65
3.6.5 delete a file 65
3.7 process directory 67
3.7.1 create directory 67
3.7.2 Delete directory 67
3.8 View File Content 68
3.8.1 View File Statistics 68
3.8.2 View File Type 69
3.8.3 view the entire file 69
3.8.4 view some files 72
3.9 summary 73
Chapter 5 more bash shell commands 75
4.1 monitoring procedure 75
4.1.1 probe process 75
4.1.2 real-time monitoring process 82
4.1.3 process terminated 84
4.2 monitoring disk space 85
4.2.1 Mount storage media 86
4.2.2 run DF command 89
4.2.3 run the du command 89
4.3 process data files 90
4.3.1 sorting data 91
4.3.2 search for data 94
4.3.3 Data Compression 96
4.3.4 archive data 99
4.4 Conclusion 100
Chapter 4 use Linux environment variables 5th
5.1 What is environment variable 101
5.1.1 global environment variable 102
5.1.2 local environmental variable 103
5.2 set the environment variable 106
5.2.1 set local environment variable 106
5.2.2 set global environment variable 107
5.3 Delete environment variables 107
5.4 default shell environment variable 108
5.5 set the path environment variable 111
5.6 positioning system environment variables 112
5.6.1 log on to shell 112
5.6.2 Interactive Shell 116
5.6.3 non-interactive shell 118
5.7 variable array 118
5.8 use command alias 119
5.9 Conclusion 120
Chapter 4 understanding Linux File Permissions 6th
6.1 Linux security 122
6.1.1/etc/passwd file 122
6.1.2/etc/shadow file 124
6.1.3 add new user 125
6.1.4 delete user 127
6.1.5 modify user 128
6.2 use Linux Group 130
6.2.1/etc/group file 131
6.2.2 create a new group 131
6.2.3 modify group 132
6.3 understand file permissions 133
6.3.1 use File Permission 133
6.3.2 default file permission 134
6.4 change Security Settings 136
6.4.1 Change permissions 136
6.4.2 change link 137
6.5 shared file 138
6.6 conclusion 139
Chapter 4 File System Management 7th
7.1 explore Linux File System 141
7.1.1 basic Linux File System 141
7.1.2 Log File System 142
7.1.3 extended Linux Log File System 143
7.2 operating file system 145
7.2.1 create a partition 145
7.2.2 create a file system 147
7.2.3 if error 149
7.3 logical Volume Manager 150
7.3.1 logical volume Management Layout 150
7.3.2 Linux LVM 151
7.3.3 use Linux LVM 153
7.4 conclusion 157
Chapter 4 install software programs 8th
8.1 package management basics 158
8.2 Debian-based systems 159
8.2.1 aptitude management software package 159
8.2.2 install software package 161 With Aptitude
8.2.3 Update Software with aptitude 163
8.2.4 uninstall software with aptitude 164
8.2.5 aptitude library 164
8.3 Red Hat-based systems 166
8.3.1 List Installed packages 166
8.3.2 install software 167 With yum
8.3.3 Update Software 168 with yum
8.3.4 uninstall the software with Yum 169
8.3.5 handle corrupted package dependency 169
8.3.6 Yum software library 171
8.4 install 172 from source code
8.5 conclusion 174
Chapter 4 Use editor 9th
9.1 Vim editor 176
9.1.1 Vim basics 176
9.1.2 edit data 178
9.1.3 copy and paste 179
9.1.4 searching and replacing 180
9.2 emacs editor 180
9.2.1 use Emacs 180 on the console
9.2.2 use Emacs 185 in X Window
9.3 KDE Series Editor 186
9.3.1 kwrite editor 186
9.3.2 Kate editor 190
9.4 gnome editor 192
9.4.1 start gedit 192
9.4.2 basic gedit functions 193
9.4.3 set preference 194
9.5 conclusion 196
Part 2 basics of shell script Programming
Chapter 2 build BASIC script 10th
10.1 use multiple commands 200
10.2 create a shell script file 201
10.3 Display message 202
10.4 use variable 203
10.4.1 environment variable 204
10.4.2 uservariable 205
10.4.3 reverse quotation mark 206
10.5 redirect Input and Output 207
10.5.1 output redirection 208
10.5.2 input redirection 208
10.6 pipelines 209
10.7 perform mathematical operations 212
10.7.1 expr command 212
10.7.2 square brackets 214
10.7.3 floating point solution 215
10.8 exit script 218
10.8.1 view exit status code 218
10.8.2 exit command 219
10.9 conclusion 221
Chapter 4 Use structured commands 11th
11.1 use if-then statement 222
11.2 if-then-else statement 224
11.3 nested if 225
11.4 test command 226
11.4.1 Value Comparison 227
11.4.2 string comparison 228
11.4.3 file comparison 232
11.5 composite condition test 239
11.6 advanced features of if-then 240
11.6.1 use double angle brackets 240
11.6.2 use brackets 241
11.7 case command 242
11.8 Conclusion 243
Chapter 2 more structured commands 12th
12.1 for command 245
12.1.1 read the value 246 from the list
12.1.2 read the Complex Value in the list 247
12.1.3 read list 248 from variable
12.1.4 read the value 249 from the command
12.1.5 change field separator 250
12.1.6 use wildcards to read directory 251
12.2 C language-style for command 253
12.2.1 for command 253 in C Language
12.2.2 use multiple variables 255
12.3 While command 255
12.3.1 basic while format 255
12.3.2 use multiple test commands 256
12.4 until command 258
12.5 nested loop 259
12.6 process file data cyclically 261
12.7 control loop 262
12.7.1 the break command 262
12.7.2 continue command 265
12.8 processing loop output 267
12.9 conclusion 269
Chapter 4 handling user input 13th
13.1 command line parameters 270
13.1.1 read parameter 270
13.1.2 read program name 272
13.1.3 test parameter 274
13.2 special parameter variable 274
13.2.1 parameter count 274
13.2.2 capture all data 276
13.3 move variable 277
13.4 Processing option 278
13.4.1 search option 279
13.4.2 use the getopt command 282
13.4.3 use the more advanced getopts 284
13.5 standardize options 286
13.6 obtain user input 287
13.6.1 read 287
13.6.2 timeout 289
13.6.3 hide 290
13.6.4 read 290 from the file
13.7 Conclusion 291
Chapter 1 data presentation 14th
14.1 understand Input and Output 293
14.1.1 standard file descriptor 293
14.1.2 redirection error 295
14.2 resend 297 in the script
14.2.1 temporary redirection 297
14.2.2 permanent redirect 298
14.3 repeat 299 in the script
14.4 create your own redirection 299
14.4.1 create output file descriptor 300
14.4.2 redirection file descriptor 300
14.4.3 create the input file descriptor 301.
14.4.4 create a read/write file descriptor 302
14.4.5 disable file descriptor 303
14.5 list opened file descriptors 304
14.6 Stop command output 305
14.7 create a temporary file 306
14.7.1 create a local temporary file 306
14.7.2 create a temporary file in the/tmp directory 308
14.7.3 create a temporary directory 308
14.8 record message 309
14.9 conclusion 310
Chapter 2 control script 15th
15.1 processing signal 312
15.1.1 review Linux signal 312
15.1.2 generate signal 313
15.1.3 capture signal 314
15.1.4 capture script exit 315
15.1.5 remove capture 316
Run script 15.2 In later Mode
15.2.1 run script 317 in the background
15.2.2 run multiple background jobs 318
15.2.3 exit terminal 319
15.3 run script 319 in non-Console
15.4 job control 320
15.4.1 view job 320
15.4.2 322 of stopped jobs restarted
15.5 adjusted modest 323
15.5.1 nice command 323
15.5.2 renice command 324
15.6 scheduled job running 324
15.6.1 use the AT command to plan the execution of job 325
15.6.2 scheduled regular execution of script 328
15.7 run 330 at startup
15.7.1 run script 330 at startup
15.7.2 start 332 in the new shell
15.8 conclusion 333
Part 3 advanced shell script Programming
Chapter 4 create functions 16th
16.1 BASIC script functions 336
16.1.1 create function 337
16.1.2 use function 337
16.2 return value 339
16.2.1 default exit code 339
16.2.2 use the return command 340
16.2.3 use function output 341
16.3 use variable 342 in Functions
16.3.1 Pass Parameter 342 to function
16.3.2 process variable 344 in the function
16.4 array variables and functions 346
16.4.1 pass array parameter 346 to function
16.4.2 return array 348 from the function
16.5 function recursion 349
16.6 create a database 350
16.7 use function 351 on the command line
16.7.1 create function 352 on the command line
16.7.2 define function 352 in. bashrc File
16.8 Conclusion 354
Chapter 2 graphical desktop Script Programming 17th
17.1 create a text menu 355
17.1.1 create menu layout 356
17.1.2 create a menu function 356
17.1.3 add menu logic 357
17.1.4 integrate shell script menu 358
17.1.5 use the SELECT command 359
17.2 Use Window 360
17.2.1 dialog package 361
17.2.2 dialog option 366
17.2.3 use the dialog command 368 in the script
17.3 use graphics 369
17.3.1 KDE 369
17.3.2 gnome 372
17.4 conclusion 376
Chapter 2 first recognized SED and gawk 18th
18.1 Text Processing 377
18.1.1 sed editor 377
18.1.2 gawk program 380
18.2 sed editor basics 385
18.2.1 more replacement options 385
18.2.2 IP address 387
18.2.3 Delete row 389
18.2.4 insert and add text 391
18.2.5 modify row 392
18.2.6 convert command 393
18.2.7 review printed 394
18.2.8 use sed to work with files 396
18.3 conclusion 398
Chapter 2 Regular Expressions 19th
19.1 what is a regular expression 399
19.1.1 definition 399
19.1.2 type of Regular Expression 400
19.2 define bre mode 401
19.2.1 text 401
19.2.2 special character 402
19.2.3 403 characters
19.2.4 point character 405
19.2.5 character group 405
19.2.6 exclude character group 407
408
19.2.8 special character group 409
19.2.9 asterisk 409
19.3 extended regular expression 411
19.3.1 question mark 411
19.3.2 plus sign 412
19.3.3 use curly brackets 412
19.3.4 MPs queue 413
19.3.5 aggregation expression 414
19.4 Regular Expression 414
19.4.1 directory file count 415
19.4.2 verification phone number 416
Resolution email address 417
19.5 conclusion 419
Chapter 2 sed advanced section 20th
20.1 multi-line command 420
Release 1.1 next command 421
Release 1.2 multi-line deletion command 424
Statement 1.3 multi-line printing command 424
20.2 reserved space 425
20.3 exclude command 426
20.4 change stream 428
Route 4.1 jump to 429
20174.2 test 430
20.5 mode replacement 431
20175.1 and 431
When 5.2 Replace the separate word 432
20.6 use sed 433 in the script
4.1.6.1 use the packaging script 433
Listen 6.2 redirect sed output 434
20.7 create sed utility 434
Limit 7.1 double row spacing 434
7.2 double row spacing of files that may contain blank lines by 435
7.3: number of rows in the file 436
7.4 print the end row 437
7.5 Delete row 437
7.6 delete HTML Tag 439
20.8 conclusion 441
Chapter 2 gawk advanced tutorial 21st
21.1 use variable 442
21.1.1 built-in variable 442
21.1.2 custom variable 447
21.2 process arrays 449
21.2.1 define the array variable 449
21.2.2 traverse an array variable 450
21.2.3 Delete array variable 451
21.3 usage mode 451
21.3.1 Regular Expression 451
21.3.2 matching operator 452
21.3.3 mathematical expression 452
21.4 structured commands 453
21.4.1 if statement 453
21.4.2 while statement 455
21.4.3 do-while statement 456
21.4.4 for statement 457
21.5 format and print 457
21.6 built-in functions 460
21.6.1 mathematical functions 460
21.6.2 string function 461
21.6.3 time function 463
21.7 user-defined functions 463
21.7.1 define function 463
21.7.2 use a custom function 464
21.7.3 create a function library 464
21.8 Conclusion 465
Chapter 2 use other shell 22nd
22.1 what is Dash shell 467
22.2 features of dash shell 468
22.2.1 dash command line parameter 468
22.2.2 dash environment variable 469
22.2.3 dash built-in command 471
22.3 dash Script Programming 472
22.3.1 create dash script 473
22.3.2 unavailable features 473
22.4 zsh shell 477
22.5 zsh shell composition 478
22.5.1 shell option 478
22.5.2 built-in command 480
22.6 zsh Script Programming 485
22.6.1 mathematical calculation 485
22.6.2 structured command 487
22.6.3 function 487
22.7 conclusion 489
Part 4 advanced shell script programming topic
Chapter 4 database use 23rd
23.1 MySQL database 492
23.1.1 install MySQL 492
23.1.2 MYSQL client interface 494
23.1.3 create a MySQL database object 498
23.2 PostgreSQL database 500
23.2.1 install PostgreSQL 501
501 PostgreSQL command line interface
23.2.3 create a PostgreSQL database object 503
23.3 use data tables 505
23.3.1 create a data table 505
23.3.2 insert and delete data 507
23.3.3 query 508 of data
23.4 Use Database 509 in scripts
23.4.1 connect to database 509
23.4.2 send command 511 to server
23.4.3 format 514 data
23.5 conclusion 516
Chapter 5 use web 24th
24.1 Lynx program 517
24.1.1 install Lynx 518
24.1.2 Lynx command line 518
24.1.3 Lynx configuration file 523
24.1.4 Lynx environment variable 524
24.1.5 capture data 524 from lynx
24.2 curl program 527
24.2.1 install curl 527
24.2.2 explore curl 527
24.3 use zsh to process network 528
24.3.1 TCP module 528
24.3.2 Client/Server mode 529
24.3.3 use zsh for C/S programming 530
24.4 conclusion 533
Chapter 4 use e-mail 25th
25.1 Linux e-mail basics 534
25.1.1 e-mail 534 in Linux
25.1.2 Email Transfer proxy 535
25.1.3 mail delivery agent 536
25.1.4 email user agent 537
25.2 create a server 540
25.2.1 send mail 541
25.2.2 Postfix 543
25.3 use mailx to send messages 545
25.4 mutt program 548
25.4.1 install mutt 548
25.4.2 mutt command line 548
25.4.3 use mutt 549
25.5 conclusion 551
Chapter 2 script utilities 26th
26.1 disk space monitoring 552
26.1.1 required functions 552
26.1.2 script 555
26.1.3 run the script 556
26.2 back up 557
26.3 manage user accounts 563
26.3.1 required functions 563
26.3.2 create the script 569
26.4 conclusion 575
Chapter 2 shell script programming (advanced tutorial 27th)
27.1 Monitoring System Statistical Data 576
27.1.1 System Snapshot 576
27.1.2 System Statistical Data Report 582
27.2 problem tracking database 589
27.2.1 create database 589
27.2.2 record issue 591
27.2.3 update 594
27.2.4 query for problem 599
27.3 conclusion 602
Appendix A Bash command Quick Guide 604
Appendix B SED and gawk Quick Guide 611
This book is from: China Interactive publishing network