small confusion about redirection in linux
Go to solution
Solved by Eigenvektor,
5 minutes ago, shivajikobardan said:But > was ignored. Isn't it?
No, it wasn't ignored. That's why the file was cleared. But your "zcho" doesn't produce any output, so there's nothing new to write into the file, while "echo" would.
It sees the >, clears the file, then tries to execute "zcho whatever", that fails, so there's no output to redirect.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now