shell

Shell Programming @import "http://pangea.stanford.edu/ses_main.css"; @import "http://pangea.stanford.edu/ses_secondary.css"; @import "http://pangea.stanford.edu/computerinfo/style.css"; /*\*//*/ @import "http://pangea.stanford.edu/ie5mac.css"; @import "http://pangea.stanford.edu/ie5mac_secondary.css"; /**/ /* @import http://pangea.stanford.edu/iefix.css"; the school people research academics facilities community alumni internal About the School Strategic Plan School History Job Opportunities Contact Us Search Browse Faculty Dean's Office Research Groups Faculty Research InterestsLaboratory Facilities Industrial Affiliate Programs Prospective Students Graduate Programs Undergraduate Programs Undergraduate Research Courses Hartley Conference Center Laboratory Facilities Computing Facilities Branner Library Public Programs K-12 Programs Teacher Programs Commencement Photos Supporting Earth Sciences Alumni Association Apparel & Gifts Webmail Computing Info GSAC Pangea Message System HomeInternal Computer Info Home News New Users Policies Email Web Hosting Get Help Net Connections Macintosh Windows PC Unix/Linux System Pangea Server School Resources Using Unix Overview Documentation Accounts Using the Shell Using X-Windows File Manipulation Net Commands Editing Text Formatting Text Printing Filters & Utilities Programming Shell programming Last revision August 6, 2004 Table of Contents: Basic types of statements in a shell script How do you execute a shell script? Examples of simple scripts Working with script variables, including command-line arguments Command substitution Expressions involving variables Other forms of input to shell variables or commands in a script Flow-of-control statements This discussion applies to scripts written for the C-shell (csh). Bourne shell (sh) scripts are similar, although the exact syntax differs. A shell script is a file containing a set of commands to be executed (run) by the shell in sequence as it reads the file. In its simplest form, a shell script is simply a way to save a set of commands that are often executed, such as the initialization commands for your login session that are stored in the .login script file, so you don't have to re-type the set everytime you want to run it. Instead, you simply run the script that contains all the commands. Strictly speaking, everything that you can put into a shell script can also be executed interactively by typing on the command line, although the looping constructs can be cumbersome. This gives you the chance to test out the syntax of various shell constructs. The shell provides tools to make shell scripts more powerful, even full-fledged programs. Shell programming is organized around the concepts of "substitution" and "flow-of-control". Substitution is used to manipulate values within the script. It involves using the values of variables as part of a command; and taking the output of a command to be the new value of a variable. Flow-of-control refers to common programming constructs such as loops and if-then-else statements that are used to control which statements in the script are executed in which order, often depending upon the value of a variable; or to cause repetitive execution of a set of commands with different variable or input values. Comments? Stanford University | © Stanford University. All Rights Reserved. Stanford, CA 94305. (650) 723-2300. Terms of Use | Copyright Complaints разделы охота hi-fi мужчина выходной портативный радиостанция корпаративные вечеринка бензопила stihl имплантат измеритель освещенность raymond weil электроинструмент метабо купить нипель любимый цвет пескоструйка кожгалантерея переработка резина антенна радиочастотный авиатакси светлогорск dvd-box билет большой фосфоресцирующий краска shell