Commit e41a9441 authored by vagrant's avatar vagrant

[BSA-00] (ArndtED) Adds solution to 3

parent 03dde3cd
#!/bin/bash
#Assignment 3: Create a script to capitalize given file names if they are present in the present working directory
PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P })
for givenName in cat $1
[[ -z $1 ]] && echo "No input arguments provided" && exit 1
for givenName in "$@"
do
#for fileName in $PARENT_PATH
#do
# echo "I am working"
# if [[ $givenName == $fileName ]]; then
# echo "${fileName^^}"
# fi
# done
if [[ -f $givenName ]]
then
echo ${givenName^^}
else
echo "No file by name $givenName exists in this directory."
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment