0

In bash, I can redirect stderr using 2>&1 with the find command and pipe it to grep to remove any Permission denied messages. How do I do this in csh? I am getting the error message Ambiguous output redirect. I have already tried the syntax at this question, and it gives me the error described.

Community
  • 1
  • 1
Engineer2021
  • 3,288
  • 6
  • 29
  • 51
  • possible duplicate of [How to redirect stdout and stderr from csh script](http://stackoverflow.com/questions/1849358/how-to-redirect-stdout-and-stderr-from-csh-script) – Ben Sep 17 '13 at 12:46
  • also possible duplicate of http://stackoverflow.com/questions/9426440/stderr-redirection-methods – Ben Sep 17 '13 at 12:46
  • @Ben: Second link does not answer my question, nor is the answer having to do with find. And first link does not have to do with find nor does it only redirect stderr. – Engineer2021 Sep 17 '13 at 12:51
  • Both of them answer your question. – Ben Sep 17 '13 at 12:52
  • This isn't possible without writing to a file then grepping it: http://stackoverflow.com/questions/13720246/redirect-stderr-to-stdout-in-c-shell – swdev Sep 30 '13 at 18:15

2 Answers2

1

Theoretically you can use "! -executable -prune -o ..." to enter only accessible directories.

Lajos Veres
  • 13,595
  • 7
  • 43
  • 56
1

Per the link that @swdev posted in a comment above, the only way to do this by sending it to a file and then using grep on that file when you are in csh.

Engineer2021
  • 3,288
  • 6
  • 29
  • 51