Very nice, works well. Can you do me a huge favor and break down the sed command you used here and why it works the way it does... I am still trying to figure out how to properly use it and I learn by examples better than reading hypothetical explanations.
's/ --- Substitute directive
./ --- contains everything upto last / ("/Users/rtipton/Desktop/testusers/")
(.) --- contains everything after last / (test)
/\1/ --- what to substitute (like $1 variable, what is inside the ( ) is stored in \1 )
there are extra \ because you have to escape metacharacters
I didnt know much about sed and awk before I found this site. The way I am learning, is people ask how to do something, I read others solutions and try to replicate it.
I have created my own wiki to keep all my notes in.