Bugzilla – Bug 138
Unable to append to a file in Korn shell
Last modified: 2004-05-12 18:34:26 MDT
While using sudo from the Bourne or Korn shells on Solaris 8 or 9, I am unable to append to a file. Example: sudo echo foo >> foofile ksh: foofile: cannot create The target file may already exist or may need to be created by the command; either way it doesn't work. If I actually su to root, this works just fine.
Redirection is handled by the shell, not sudo. If you were to do something like sudo ksh -c "echo foo >> foofile" it would work.