"Date: $(date)" > "${BODY}"
                  
                  
                  but I get this error
                  
                  
                  line 10: Date: /tmp/body.txt: No such file or directory
                  
                  
                  If I run echo "Date: $(date)" > /tmp/body.txt it works though 😕
                  
                  
                  Do you know why it's not working?
                  
                  
                
How are you executing it
With ./script.sh
Post the entire script then.
Without a shebang? What program is running it?
Обсуждают сегодня