Classic Shell Scripting phần 10 ppt
... Read and execute a given file, in the current shell. return Return a value from a shell function. set Print shell variables and values; set shell options; set the command-line parameters ... so flavors of Unix, and found values of 255, 102 4, and 4095. Hewlett-Packard HP-UX 10. 20 and 11.23 have only 14, but their getconf reports 102 3 and 102 4. Because Unix systems can sup...
Ngày tải lên: 12/08/2014, 10:22
... a problem, Houston! added interface ip =10. 10 .10. 1 bcast =10. 10.255.255 nmask=255.255.0.0 timeout connecting to 10. 10 .10. 4:139 Error connecting to 10. 10 .10. 4 (Operation already in progress) Connection ... progress) Connection to JohnB failed added interface ip =10. 10 .10. 1 bcast =10. 10.255.255 nmask=255.255.0.0 Connection to CindySue failed added interface ip =10. 10 .10. 1 bca...
Ngày tải lên: 09/08/2014, 16:20
Classic Shell Scripting phần 1 pps
... tools, together with the standard shell, to get your job done. This is the art of shell scripting. Shell scripting requires not just a knowledge of the shell language, but also a knowledge ... Creating and Using Tem Section 10. 4. Finding Files sSection 10. 5. Running Commands: xarg Section 10. 6. Filesystem Space Information Section 10. 7. Comparing Files ction 10. 8. S...
Ngày tải lên: 12/08/2014, 10:22
Classic Shell Scripting phần 2 ppsx
... first with the Berkeley style: $ lpr -Plcb102 sample.ps Send PostScript file to prin queue lcb102 $ lpq -Plcb102 Ask for print queue status lcb102 is ready and printing Rank Owner Job File(s) ... /etc/p chico:x:12501 :100 0:Chico Marx:/home/chico:/bin/bash daemon:x:2:2:daemon:/sbin:/sbin/nologin groucho:x:12503:2000:Groucho Marx:/home/groucho:/bin/sh gummo:x:12504:300 harpo:x:12502 :...
Ngày tải lên: 12/08/2014, 10:22
Classic Shell Scripting phần 4 doc
... while IFS=: read user passwd uid gid name home shell do shell= $ {shell: -/bin/sh} # Empty shell field means /bin/sh file="/tmp/$(echo $shell | sed -e 's;^/;;' -e 's;/;-;g').mailing-li ... possible to define shell functions that extend or override regular shell built-ins. ature is used most often in interactive shells. For example, suppose that you w...
Ngày tải lên: 12/08/2014, 10:22
Classic Shell Scripting phần 5 docx
... It is often convenient to wrap the awk invocation in a shell script. To keep the script more readable, store a lengthy program in a shell variable. You can also generalize the script to allow ... conventional programming language like C or C++, the result w Unlike most other scripting languages, aw Also, unlike other scripting languages, awk is part of POSIX, and there are implemen...
Ngày tải lên: 12/08/2014, 10:22
Classic Shell Scripting phần 7 pps
... daemon:x:2:2:daemon:/sbin:/sbin/no /nologi adm:x:3:4:adm:/var/adm:/sbin eorge:x: 1100 :10: George Washi g betsy:x:1 110: 10:Betsy Ross:/home/betsy:/bin/bash e/jhancock:/bin/bash jhancock:x:300 :10: John Hancock:/hom 10: Ben Franklin:/home/ben: ben:x:301: tj:x :105 :10: Thomas ... dm:x:3:4:adm:/var/adm:/sbin/nologin a tolstoy:x:2076 :10: Le amus:x:112 :10: Alber c ben:x:201 :10: Ben Fran...
Ngày tải lên: 12/08/2014, 10:22
Classic Shell Scripting phần 8 doc
... Bourne shell. It is likely that if you'll be doing heavy-duty scripting that takes advantage of shell- language extensions, you'll be using one or the other or both of these two shells. ... manual pages on your system. On some systems, the shell that is used to run the at commands is the Bourne shell (/bin/sh), and your login shell on other systems. You can insulate...
Ngày tải lên: 12/08/2014, 10:22
... Please review the function in Listing 2 .10. function while_LINE_line_bottom_cmdsub2 { while LINE=$(line) do echo “$LINE” : done < $FILENAME } Listing 2 .10 while_LINE_line_bottom_cmdsub2 function ... beginners, the word “function” helps under- standing the whole shell script a lot. The $FILENAME variable is set in the main body of the shell script. Within the while loop notice that...
Ngày tải lên: 14/08/2014, 16:20
Mastering Unix Shell Scripting phần 10 potx
... 2. equate_base_2_to _10. ksh: Converts numbers from base 2 to base 10. equate_base _10_ to_8.ksh: Converts numbers from base 10 to base 8. equate_base_8_to _10. ksh: Converts numbers from base 8 to base 10. Chapter ... interface ip =10. 10 .10. 1 bcast =10. 10.255.255 nmask=255.255.0.0 Connected. Type your message, ending it with a Control-D sent 45 bytes Sent OK ==> booboo Listin...
Ngày tải lên: 14/08/2014, 16:20