shell: don't use malloc on each line

strdup uses malloc, which may not be present in a useful fashion (oneway_malloc) for short life cycles of buffers