Unix Week 7 Notes
Popular in Intro to Unix
verified elite notetaker
Popular in Department
This 4 page Class Notes was uploaded by Annette Marin on Wednesday March 23, 2016. The Class Notes belongs to COP 3353 at Florida State University taught by Melina Vastola in Spring 2016. Since its upload, it has received 24 views.
Reviews for Unix Week 7 Notes
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 03/23/16
Week 7: Basics of Scripting! 3/23/16 4:14 PM Two ways to run a script: 1. > sh nameofscript name of shell 2. give the script executable (+x) permissions > nameofscript needs directive line: #!/bin/sh Want to be reminded of what is in script file? After running it, type in “cat nameofscript”. Echo command input: > echo I like summer output: I like summer “echo’s” back to you what you type Anything you can do in a command line, you can do in a script. Variables > script.sh 1234 spongebob Patrick $1 $2 $3 $# - number of command line arguments $0 - name of script $@ string of all command variables Environment Variables env – allows you to see all environment variables see contents of a variable: echo $SHELL setenv – set an environment variable or create a new one ex: setenv NAME value unsentenv NAME User Created Variables (inside a script) NAME=hi 3/23/16 4:14 PM 3/23/16 4:14 PM
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'