
34
Shell Scripts
• Automate steps with a shell script
> cat >hwcgi.sh
#!/bin/sh
c89 -c helloworld.c
ar -rv libhw.a helloworld.o
c89 -c hwcgimain.c
c89 -o hwcgi hwcgimain.o -L. -lhw
• Execute permission required to execute
> chmod u+x hwcgi.sh
> hwcgi.sh
• Special scripts: /etc/profile and .profile