Hacker News new | ask | show | jobs
by sprior 15 days ago
I raised eyebrows recently when I was working with someone and we needed to create a file and instead of starting an editor I did: cat > filename ... Ctrl-D
2 comments

Oh I always do that! Send them my greetings.
Why not touch or echo? No reason for an editor or cat
You can type the intended file contents as-is.
For a one line file sure, but I was creating multiple lines.