#!/bin/bash # example_02 # This is just example01 checking to see if variables # were entered. echo echo # Create two variables from the names entered first_name=$1 second_name=$2 # Check out the first variable test -n "$first_name" if [ $? -eq 1 ]; then echo -e "\nUsage: example_02 [first name] [surname]\n" exit fi # Check out the second variable test -n "$second_name" if [ $? -eq 1 ]; then echo -e "\nUsage: example_02 [first name] [surname]\n" echo -e "Get with the program $first_name!\n\n" exit fi # Let's get some time and date info echo "It is now `date`" echo # Now let's echo the other variables to standard output echo "My name is $first_name $second_name" echo # end of script