CSC209H1 Lecture Notes - Project Echo, Pepperoni, Working Directory

60 views1 pages
24 Apr 2013
School
Course
Professor

Document Summary

Iterating over arguments: another option: variables built into shell, note: variables used in command line also end up here. Bash_argv=() fruit=apple now="" today="wed jan 16 19:43:01 est 2013" :/local/packages/android-sdk-linux_x86-r12/platform- tools:/u/csc209h/winter/pub/bin:: add current working directory to . Set and shift: previous example of paramaters, set assigns position parameters to its arguments. Rw------- 1 mcraig instrs 0 jan 16 19:29 file1. $ set bash: set: -w: invalid option set: usage: set [-abefhkmnptuvxbchp] [-o option-name] [ note: this error happens because the result of ls -l file1 starts with a hyphen so set interprets this as a option flag. ] $ echo instrs: shift change the meaning of the positional parameter. #!/bin/sh while test do echo shift done. #!/bin/sh for arg in ; do echo done. Quotes and arguments: iterating over , , , all do different things.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents