home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -2-
-
-
- Appendix A - Grammar
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -3-
-
-
- item: word
- input-output
- name = value
-
- simple-command: item
- simple-command item
-
- command: simple-command
- ( command-list )
- { command-list }
- for name do command-list done
- for name in word do command-list done
- while command-list do command-list done
- until command-list do command-list done
- case word in case-part esac
- if command-list then command-list else-part fi
-
- pipeline: command
- pipeline command
-
- andor: pipeline
- andor && pipeline
- andor pipeline
-
- command-list: andor
- command-list ;
- command-list &
- command-list ; andor
- command-list & andor
-
- input-output: > file
- < file
- word
- word
-
- file: word
- & digit
- & -
-
- case-part: pattern ) command-list ;;
-
- pattern: word
- pattern word
-
- else-part: elif command-list then command-list else-part
- else command-list
- empty
-
- empty:
-
- word: a sequence of non-blank characters
-
- name: a sequence of letters, digits or underscores starting with a letter
-
-
-
-
-
-
-
-
-
-
- -4-
-
-
- digit: 0 1 2 3 4 5 6 7 8 9
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -5-
-
-
- Appendix B - Meta-characters and Reserved Words
-
- a) syntactic
-
- pipe symbol
-
- && `andf' symbol
-
- `orf' symbol
-
- ; command separator
-
- ;; case delimiter
-
- & background commands
-
- ( ) command grouping
-
- < input redirection
-
- input from a here document
-
- > output creation
-
- output append
-
-
-
- b) patterns
-
- match any character(s) including none
-
- ? match any single character
-
- [...] match any of the enclosed characters
-
-
-
- c) substitution
-
- ${...}
- substitute shell variable
-
- `...` substitute command output
-
-
-
- d) quoting
-
- \ quote the next character
-
- '...' quote the enclosed characters except for '
-
-
-
-
-
-
-
-
-
-
-
- -6-
-
-
- "..." quote the enclosed characters except for $ ` \ "
-
-
-
- e) reserved words
-
- if then else elif fi
- case in esac
- for while until do done
- { }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-