CSCI 3215 (Advanced UNIX Command-Line Tools):
Sample Programs
Shell scripts
hello
(9/12): "Hello world" as a shell script.
fcn-example
(9/12): Simple example of defining and using a function.
lcname
(9/12): Script to rename a file, changing all uppercase to lowercase.
upmachines
(9/12): Script to display names of all machines that are "up".
factorial-1
and
factorial-2
(9/17): Example of recursive function, two versions.
powers-of-two
(9/17): Example of loop and use of
bc
.
rename-files
(9/17): Script to do mass rename of files, changing suffix.
find-broken-links-1
and
find-broken-links-2
(9/17): Script to find broken symbolic links, two versions.
define-is-integer
(10/3): Sourceable definition of
is-integer
function.
factorial-2-with-check
(10/3): Factorial example revised to check for bad input.