Institute for Networking and Security Research Department of Computer Science and Engineering Pennsylvania State University, University Park, PA
Systems and Internet Infrastructure Security
i i
Shell Programming Professor Patrick McDaniel Fall 2016 Vim + Make - - PowerPoint PPT Presentation
Systems and Internet i Infrastructure Security i Institute for Networking and Security Research Department of Computer Science and Engineering Pennsylvania State University, University Park, PA Shell Programming Professor Patrick McDaniel
Institute for Networking and Security Research Department of Computer Science and Engineering Pennsylvania State University, University Park, PA
i i
just :make) to build
and jump to each error
programs
extension
more)
current user
home directory
as a tilde (~)
for executables
see later)
Very detailed treatment: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/
parentheses, braces, etc.
colorscheme koehler set autoindent set autowrite set backup set number set showmatch set title filetype plugin indent on syntax on
echo Penn State is #1 echo Micro$oft Windows echo Steins;Gate
echo Penn State is #1 echo Micro$oft Windows echo Steins;Gate
closing '
some other things)
this?
run
info
doubled
./script1 foo foofoo
brackets, one per line
./script2 "foo bar" baz [foo bar] [baz] [] []
the process
◾ More on signals later...
programs, as long as they were started from the command line
the entire process
◾ Zero: success ◾ Nonzero: failure, error,
killed by a signal, etc.
exit early, e.g. exit 1
not”) operator in C
#include <stdlib.h> int main(int argc, char **argv) { // Quick-and-dirty int conversion return atoi(argv[1]); }
lets me know for sure when something fails
directory
length)
regardless of exit status
characters: echo * echo *.c
echo hello.?
for f in hello.*; do mv "$f" "$f.bak" done
without really changing it
lines containing string
files under the current directory
for; see man find
file foo is
from stdin