#!/bin/bash

# little shell script to demonstrate the different
#    answers to clicker question 4 during CS 279
#    Week 8 Lecture 1, 10-9-12
# by: Sharon Tuttle
# last modified: 10-10-12 

arg=$1
echo $arg

#if  $arg in .*\.txt$
#if [[ arg = .*\.txt$ ]]
#if [ $arg =~ ".*\.txt$" ]
if [[ $arg =~ .*\.txt$ ]]
#if [[ "$arg" =~ ".*\.txt$" ]]
then
    echo "SUCCESS"
else
    echo "NOPE"
fi