我有这组命令:
s3ls="aws s3 ls $ssyss3/ --recursive --human-readable --summarize"
egrepCommand="egrep '$currentDate|Total'"
totalSize=$(echo $s3ls|$egrepCommand| awk -F 'Total Size:' '{print $2}'|sed '/^$/d')
echo $totalSize
Run Code Online (Sandbox Code Playgroud)
但我收到此错误:
egrep '2019-05-11|Total': command not found
Run Code Online (Sandbox Code Playgroud)
我错过了什么?