3 ms·
Hardly "basic", natural assumption after knowing what say date > file does is assuming "there needs to be data source on left side, and target file on the
by ilyt 4y ago
Hardly "basic", natural assumption after knowing what say
date > file
does is assuming "there needs to be data source on left side, and target file on the right side
Similiar with
wc < file
"There needs to be receiver program on the left side, and file on the right"
The assumption from seeing it is "program on left, data on right"
< file wc
breaks that assumption completely.
Honestly I don't think that in 15+ years I ever saw that in the wild in any shell script
- chungy 4y ago> Honestly I don't think that in 15+ years I ever saw that in the wild in any shell script I've done it in shell scripts, very rarely interactively. In scripts, it sometimes just looks better defining that part first. Wait until you see the redirect in the middle of program arguments. That's where it gets confusing. At least the redirect at the very beginning or very end of the line is easy. :)