shell function for process key values