From 51533dc77171d7b88890331f897cc1c7db6858e4 Mon Sep 17 00:00:00 2001 From: Gabe Torres <69164745+gabtorre@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:07:59 -0800 Subject: [PATCH] Update 'loop over paths in file' example --- docs/batch-changes/batch-spec-cheat-sheet.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/batch-changes/batch-spec-cheat-sheet.mdx b/docs/batch-changes/batch-spec-cheat-sheet.mdx index 2f7e510ba..fe51a721b 100644 --- a/docs/batch-changes/batch-spec-cheat-sheet.mdx +++ b/docs/batch-changes/batch-spec-cheat-sheet.mdx @@ -31,10 +31,10 @@ on: steps: - run: | - cat /tmp/search-results | while read file; + while IFS= read -r file || [ -n "$file" ] do sed -i 's/OLD-VALUE/NEW-VALUE/g;' "${file}" - done + done < /tmp/search-results container: alpine:3 files: /tmp/search-results: ${{ join repository.search_result_paths "\n" }}