Hacker News new | ask | show | jobs
by leviathan 2586 days ago
I've always done it as: `> file`
2 comments

That's actually very nice, I never thought about that one.
Unfortunately, this doesn't work in fish:

> fish: Expected a command, but instead found a redirection

Right but I don't think anyone is really concerned if it runs in fish. Fish is non standard and doesn't try to adhere to bash. If we want to write fish shell scripts we can do that elsewhere
Funny how the same sentence applies to bash wrt POSIX shell in other contexts