change the way define shell function to adjust dash shell in ubuntu.