shell: dont't use malloc on each line