save item

is there any way to save a item that a player has when executing a command and then give the item that was saved when a another command is executed?
Continue to help post