Unix for Artists: Fun with FFMPEG is a workshop hosted by the Echo Park Film Center.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
unix4artists/bash/functions.sh

26 lines
610 B

#!/bin/bash -e
#####################################################
#
# Functions can be defined using the "name () {}"
# notation where the code is contained within the
# brackets. Functions receive arguments the same way
# a script does, using the "$#" notation.
#
#####################################################
myFunction () {
if [ "${1}" != "" ]; then
echo "Your first argument is \"${1}\""
else
echo "Called myFunction with no arguments"
fi
}
# Invoke your function as if it were any other command
# or application located in your $PATH.
myFunction
sleep 2
myFunction "First argument"