Reputation: 17234
I've a long bash script with multiple echo
statements.
I had a requirement to redirect bash script's output to a file without using redirection from bash shell. I could accomplish that by doing:
exec 1>>/tmp/output
How do I do something like both redirecting to a file and not stopping to output in STDOUT?
I don't want to edit each and every echo statement to accomplish it.
Upvotes: 0
Views: 365