0

I have script

#!/bin/bash
exec &> >(tee file.log)
some command
some command
some command
some command

I add comand exec &> >(tee file.log) to save output and still the outpun in CMD When I run it I get error : No such file or directory: /dev/fd/62 if I write some command | tee file.log all work properly, but I don't want to add it to every comand. The comand exec &>file.log is work, but it doesn't write in CMD. Bash version is GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu) What the problem?

0 Answers0