Bash script builds correct $cmd but fails to execute complex stream
问题 This short script scrapes some log files daily to create a simple extract. It works from the command line and when I echo the $cmd and copy/paste, it also works. But it will breaks when I try to execute from the script itself. I know this is a nightmare of patterns that I could probably improve, but am I missing something simple to just execute this correctly? #!/bin/bash priorday=$(date --date yesterday +"%Y-%m-%d") outputfile="/home/CCHCS/da14/$priorday""_PROD_message_processing_times.txt"