Reputation: 575
An argument example:
../path/cse/lab3/remove
Right now, it's printing out all the directory and files in 'lab3'. I want it to print out all the files in 'remove'. I'm not sure how to do that. I want to use a for loop.
Code:
if test -d $1 #check if argument is a directory.
then
for fileName in *
do
echo "what is this::: $fileName"
done
fi
Also how do I print out all the files as strings to look something like this:
remove/test.out
remove/test2.out
Upvotes: 0
Views: 59