Open hieuhtr opened 7 years ago
Inside this script
{ } &> /path/to/log/file
Or outside of this script
❯❯ ./yourscript.sh > output.txt
❯❯ cat MacNotification.sh #!/bin/bash { echo "Test output" /usr/bin/osascript -e 'display notification "Ngồi thẳng lưng + uống nước" with title "Suggestion"' } &> /Users/admin/Documents/Tools/output.log
I want to write all output of bash script to a file, how to do that?
Inside this script
Or outside of this script
Example: