That prints only the first line ??thunor wrote:I've got some fast portable shell scripting tips that I'd like to note.
Code: Select all
## With bash you can read a file speedily like this: echo `<file` ## This you might think is the ash/dash solution: cat file ## But I've actually found this to be the fastest for ash, bash and dash: read -r input < file echo $input
echo `<file` doesn't preserve the line feed. "cat file" is faster (on my computer)