shell: dont't use malloc on each line
clean up shell