shell() function for process execution