I have a .sh unix shell script that receives as a parameter a path, say /home/test/user1. So, in the variable ${1}, that is the parameter.
I want to create a file whose name is based on the last part of that path, user1. How can I parse that path to retrieve the last piece of the path?
I think you are looking for the basename command.
Edit: (in response to your comment)
In a shell-script variable, you need backticks: