I am going through a Google Cloud training which is using a bash script to perform sed string replacement and then deploying to endpoint services. There is this bash line that I just can't wrap my head around...
mv "$temp_file" "$TEMP_FILE"
# Because the included API is a template, we have to do some string
# substitution before we can deploy it. Sed does this nicely.
< "$API_FILE" sed -E "s/YOUR-PROJECT-ID/${project_id}/g" > "$TEMP_FILE"
Can someone explain what the redirection operator is doing before "$API_FILE" expansion? Is this another way of writing:
sed -E "s/YOUR-PROJECT-ID/${project_id}/g" "$API_FILE" > "$TEMP_FILE"
I am very confused with the position of the redirection operator "<" at the beginning of the line. The deployment is working so this isn't a syntax issue.