1

Hy. I was trying to redirect stderr and stdout of 'do-release-upgrade' command with the following command,

sudo do-release-upgrade >>logfile 2>&1

It does only redirect few lines because do-release-update invoke a subshell. So the contents of the subshell is not redirected on that file. So how can I do it? FYI, I am currently using ubuntu 14.04.01. The command above works fine on 16.04

arif
  • 579
  • 1
  • 7
  • 21
  • 1
    The shell is correct; if it isn't working in an older version of Ubuntu, I can only image the issue with with `do-release-upgrade` itself. – chepner Feb 19 '17 at 23:22
  • try surrounding the cmd in a a sub-shell, i.e. `( sudo do-release-upgrade ) >>logfile 2>&1`. (Don't have any way to test, and it may be different depending on environments). Good luck. – shellter Feb 19 '17 at 23:56
  • tried. but no luck! thanks though. – arif Feb 19 '17 at 23:59

0 Answers0