Mastering UNIX shell scripting

Mastering unix shell scripting phần 1 pdf

Mastering unix shell scripting phần 1 pdf
... Uses Modifications to Consider 18 7 18 7 18 7 18 8 18 8 18 9 18 9 19 0 19 0 19 1 19 1 19 1 19 2 19 2 19 2 19 3 19 4 19 4 19 7 19 8 203 203 208 208 212 212 213 213 214 214 215 216 216 218 223 228 248 248 248 Summary ... Execution Modify the egrep Statement 97 98 10 3 10 3 11 0 11 3 11 8 12 8 13 0 14 3 14 3 14 3 14 4 Summary Chapter 14 4 Monitoring Paging and Swap Space Syntax 14 5 14 6 AIX lsps Command HP-UX swapinfo Command ... bambam booboo bambam Aug Aug Jul Jul Jul Jul Jul 02 02 31 31 31 31 31 12:24 12 :00 23:23 21: 19 21: 19 20:42 20: 41 - 17 :59 (4+05:34) - 21: 19 21: 19 20:42 20:42 (00:00) (00:00) (00:00) (00:00) The output...
  • 71
  • 156
  • 0

Mastering unix shell scripting phần 2 pdf

Mastering unix shell scripting phần 2 pdf
... KB, or 1 024 -byte blocks, is df -k in AIX Let’s take a look at the output of the df -k command on an AIX 5L machine: Filesystem 1 024 -blocks /dev/hd4 327 68 /dev/hd2 121 2416 /dev/hd9var 5 324 8 /dev/hd3 ... sys 7m20.48s 0m51.01s 6m14.57s Method 7: function while_LINE_line_cmdsub2 real user sys 7m18.04s 0m 52. 01s 6m10.94s Method 8: function while_LINE_line_bottom_cmdsub2 real 7m20.34s Listing 2. 17 ... function while_LINE_line_cmdsub2_FD real user sys 8m24.58s 0m50.04s 7m16.07s Method 12: function while_line_LINE_FD real user sys 7m54.57s 0m35.88s 7m2 .26 s Listing 2. 17 Timing data for each loop...
  • 70
  • 148
  • 0

Mastering unix shell scripting phần 3 ppsx

Mastering unix shell scripting phần 3 ppsx
... MOUNTED ON /dev/hd4 32 768 1 637 6 51% 16 63 11% / /dev/hd2 1212416 57592 96% 36 386 13% /usr /dev/hd9var 532 48 30 824 43% 540 5% /var /dev/hd3 106496 99 932 7% 135 1% /tmp /dev/hd1 4096 39 16 5% 25 % /home ... ON /dev/vg 13/ lvol1 4190208 1155095 2850597 29% /u2 /dev/vg00/lvol7 102400 4284 92256 4% /tmp /dev/vg00/lvol 13 2 039 808 16640 73 352294 83% /test2 /dev/vg00/lvol6 720896 531 295 1779 53 75% /opt /dev/vg00/lvol5 ... MOUNTED ON /dev/vg00/lvol3 151552 89500 58669 60% / /dev/vg00/lvol1 47829 24109 18 937 56% /stand /dev/vg00/lvol9 131 0720 860829 422 636 67% /var /dev/vg00/lvol8 972800 55 439 2 39 235 8 59% /usr File System...
  • 70
  • 104
  • 0

Mastering unix shell scripting phần 4 ppsx

Mastering unix shell scripting phần 4 ppsx
... 10 HP-UX dino B.10.20 A 9000/715 22 :48 :10 22 :48 :20 22 :48 :30 22 :48 :40 22 :48 :50 07/29/102 %usr 40 40 12 %wio 0 0 %idle 0 68 100 23 Average %sys 60 60 19 35 42 Now let’s only look at the average ... Monitoring System Load 17 :45 : 14 17 :45 : 24 17 :45 : 34 25 26 25 75 74 75 0 0 0 Average 25 75 0 Now let’s look at the average of the samples directly # sar 10 | grep Average Average 26 74 0 HP-UX # sar 10 ... positions $ 14, $15, $16, and $17 HP-UX # vmstat 30 procs r b w avm 39 8382 40 7532 memory free re at 290 122 26 148 345 71 pi po 0 page fr de 0 0 sr in 128 108 faults cpu sy cs us sy id 20 14 146 14 21...
  • 70
  • 145
  • 0

Mastering unix shell scripting phần 5 doc

Mastering unix shell scripting phần 5 doc
... hdisk5 VOLUME GROUP: appvg2 00011 150 e33c3f14 VG IDENTIFIER 00011 150 e33ce9bb active ALLOCATABLE: yes 16 megabyte(s) LOGICAL VOLUMES: 54 2 (8672 megabytes) VG DESCRIPTORS: 397 (6 352 megabytes) 1 45 ... EXIT: \c” read X clear # End of mk_passwd.ksh shell script Listing 10. 15 mk_passwd.ksh shell script listing (continued) This was an interesting shell script to create I hope you picked up some ... to create the mk_passwd.ksh shell script The entire shell script is shown in Listing 10. 15 Pay particular attention to the boldface text throughout the mk_passwd.ksh shell script #!/usr/bin/ksh...
  • 70
  • 197
  • 0

Mastering unix shell scripting phần 6 doc

Mastering unix shell scripting phần 6 doc
... 26, 26, 2, 10 14 10 15 30 0 1 Jun Mar Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jul Jun Jul Jul Jul 23 29 26 26 26 26 26 26 26 29 26 29 26 26 26 26 26 26 ... /dev/hd4 32 768 /dev/hd2 1449984 /dev/hd9var 53248 /dev/hd3 1 064 96 /dev/hd1 40 96 /proc /dev/hd10opt 65 5 360 /dev/scripts_lv 102400 /dev/lv_temp 40 960 0 Free %Used 10924 67 % 61 680 96% 10 568 81% 70184 ... 12% / 40941 12% /usr 67 3 6% /var 223 1% /tmp 55 6% /home - /proc 162 60 10% /opt 887 4% /scripts 26 1% /tmpfs vfs date -Jul 23 18: 56 Jul 23 18: 56 Jul 23 18: 56 Jul 23 18: 56 Jul 23 18:57 Jul...
  • 70
  • 124
  • 0

Mastering unix shell scripting phần 7 pdf

Mastering unix shell scripting phần 7 pdf
... May 07 07: 02 2002 yogi_hp4_1ps accepting requests since May 07 07: 02 2002 long_queue not accepting requests since Tue May 07: 02:23 EDT 2002 s_q_nam not accepting requests since Tue May 07: 02:23 ... combine the shell scripts in Listings 17. 1 and 17. 4 We are also going to add the functionality to add pre- and post-ftp events Let’s start by looking at the shell script in Listing 17. 5, get_ftp_ ... Listing 17. 5 get_ftp_files.ksh shell script listing (continues) 4 47 448 Chapter 17 } ################################################################### usage_error () { echo “\nERROR: This shell...
  • 70
  • 118
  • 0

Mastering unix shell scripting phần 8 potx

Mastering unix shell scripting phần 8 potx
... Available 34- 08- 5B91-01-P 34- 08- 5B91-02-P 34- 08- 5B91-03-P 34- 08- 5B91-04-P 24- 08- 5B91-05-P 24- 08- 5B91-07-P 24- 08- 5B91-06-P 24- 08- 5B91- 08- P 24- 08- 5B91-09-P 24- 08- 5B91-10-P 24- 08- 5B91-11-P 24- 08- 5B91-12-P ... Listing 18. 2 findlarge.ksh shell script in action (continues) 471 472 Chapter 18 -rwxrwxrwx root sys 1 280 000 Aug 27 15:33 /scripts/sudo/sudo1.6.tar -rw-r r-1 root sys 46745600 Jul 27 09: 48 /scripts/scripts.tar ... Listing 19.2 log_keystrokes.ksh shell script listing Monitoring and Auditing User Key Strokes # DATE: 05/ 08/ 2002 # REV: 1.0.P # PLATFOEM: Any Unix # # PURPOSE: This shell script is used to monitor...
  • 70
  • 118
  • 0

Mastering unix shell scripting phần 9 docx

Mastering unix shell scripting phần 9 docx
... the shell script The regular expressions for testing for integers and floating point numbers include +([0 -9] ), +(-[0 -9] ), +([0 -9] |.[0 -9] , +(+[0 -9] .[0 -9] , +(-[0 -9] .[0 -9] , +([-.0 -9] ), +([+.0 -9] ) ... /tmp/myfilename.120601.131514.15 899 /tmp/myfilename.120601.131514.1 891 3 /tmp/myfilename.120601.131515.27120 /tmp/myfilename.120601.131515.236 39 /tmp/myfilename.120601.131515.13 096 /tmp/myfilename.120601.131516. 191 11 /tmp/myfilename.120601.131516.0 596 4 ... [root:yogi]@/scripts# /float_add.ksh -s 223.545 332.0 099 76553 The sum of: + 223.545 + 332.0 099 76553 to a scale of is 557.55 497 6553 Listing 22.3 float_add.ksh shell script in action 555 556 Chapter 22 Notice...
  • 70
  • 111
  • 0

Mastering unix shell scripting phần 10 docx

Mastering unix shell scripting phần 10 docx
... ip =10. 10 .10. 1 bcast =10. 10.255.255 timeout connecting to 10. 10 .10. 4:139 Error connecting to 10. 10 .10. 4 (Operation already Connection to JohnB failed added interface ip =10. 10 .10. 1 bcast =10. 10.255.255 ... interface ip =10. 10 .10. 1 bcast =10. 10.255.255 Connection to Bubba failed added interface ip =10. 10 .10. 1 bcast =10. 10.255.255 Connection to JonnyLee failed added interface ip =10. 10 .10. 1 bcast =10. 10.255.255 ... ip =10. 10 .10. 1 bcast =10. 10.255.255 nmask=255.255.0.0 your message, ending it with a Control-D ip =10. 10 .10. 1 bcast =10. 10.255.255 nmask=255.255.0.0 your message, ending it with a Control-D ip =10. 10 .10. 1...
  • 73
  • 130
  • 0

Mastering Unix Shell Scripting phần 1 pps

Mastering Unix Shell Scripting phần 1 pps
... Uses Modifications to Consider 18 7 18 7 18 7 18 8 18 8 18 9 18 9 19 0 19 0 19 1 19 1 19 1 19 2 19 2 19 2 19 3 19 4 19 4 19 7 19 8 203 203 208 208 212 212 213 213 214 214 215 216 216 218 223 228 248 248 248 Summary ... Execution Modify the egrep Statement 97 98 10 3 10 3 11 0 11 3 11 8 12 8 13 0 14 3 14 3 14 3 14 4 Summary Chapter 14 4 Monitoring Paging and Swap Space Syntax 14 5 14 6 AIX lsps Command HP-UX swapinfo Command ... bambam booboo bambam Aug Aug Jul Jul Jul Jul Jul 02 02 31 31 31 31 31 12:24 12 :00 23:23 21: 19 21: 19 20:42 20: 41 - 17 :59 (4+05:34) - 21: 19 21: 19 20:42 20:42 (00:00) (00:00) (00:00) (00:00) The output...
  • 71
  • 43
  • 0

Mastering Unix Shell Scripting phần 2 pptx

Mastering Unix Shell Scripting phần 2 pptx
... KB, or 1 024 -byte blocks, is df -k in AIX Let’s take a look at the output of the df -k command on an AIX 5L machine: Filesystem 1 024 -blocks /dev/hd4 327 68 /dev/hd2 121 2416 /dev/hd9var 5 324 8 /dev/hd3 ... sys 7m20.48s 0m51.01s 6m14.57s Method 7: function while_LINE_line_cmdsub2 real user sys 7m18.04s 0m 52. 01s 6m10.94s Method 8: function while_LINE_line_bottom_cmdsub2 real 7m20.34s Listing 2. 17 ... function while_LINE_line_cmdsub2_FD real user sys 8m24.58s 0m50.04s 7m16.07s Method 12: function while_line_LINE_FD real user sys 7m54.57s 0m35.88s 7m2 .26 s Listing 2. 17 Timing data for each loop...
  • 71
  • 127
  • 0

Xem thêm

Nạp tiền Tải lên
Đăng ký
Đăng nhập