I'm trying to execute this command with rc.local:
wget http://address/file -P /root/ 2>&1 | stdbuf -o0 awk '/[.] +[0-9][0-9]?[0-9]?%/ { print substr($0,63,3) }' | whiptail --gauge "Progress" 6 78 0
Above command shows percentage of download some file. It works without any problem from user's shell after login but when I try run this from rc.local I get:
open /dev/tty: No such device or address
I found that "2>$1" does the problem and on: https://stackoverflow.com/questions/21786633/init-script-dev-tty-no-such-device-or-address-error-on-redirect someone suggested to replace "2>&1" with "3>&2 2>&1 1>&3 3>&-". Unfortunately it doesn't work for me.
What is more curious this command works in Ubuntu 12.04 but doesnt on 14.04.1. Do someone know how to make this command (or redirection) work?