tprojectstasks() { # get the first task for each project local tasks local taskfilter=$1 if [ -z "$taskfilter" ] then tasks=$(task rc.list.all.projects=1 _projects) else tasks=$(task rc.list.all.projects=1 $taskfilter _projects) fi taskuuids=$(while IFS= read -r line; do task project:"$line" _id | head -n1 done <<< "$tasks") task "$taskuuids" projectinweek }