I tried using
ps r > log | wc log but this returns
Ambiguous output redirect..
Can someone explain why and provide another solution?
The pipe symbol ("|") redirects the output of one program to the input of another.
You however use ">" to redirect
So, you want one of the following (Hint: the latter solution is better as it doesn't create extra files.)
BTW: you might want
You are mixing redirection and piping
What you want is
If you wanted to use your methodology, then you would need to do the following