strip trailing EOL from list for -L option