In bash, the empty command can be redirected to a file:

% >out

It will create or overwrite 'out' as the empty file.  That may be useful.
But somehow you can also say

% whoami | >out

This again writes empty content.  I suggest this odd feature is not useful and 
indeed gets in the way,
since when making pipelines you may mistakenly put an extra | at the last step 
before the output redirection.

Bash should forbid the odd syntax with | immediately followed by >.
If you have | it must be followed by a command.  Note that in most cases this 
is already required:

% | # syntax error
% whoami | # syntax error

-- 
Ed Avis <e...@waniasset.com>


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

Reply via email to