From 680c908c98100f68193e2d47001d19d0e065d008 Mon Sep 17 00:00:00 2001 From: githubofkrishnadhas Date: Thu, 21 May 2026 17:20:09 +0530 Subject: [PATCH] Refactor sync_file function: replace grep with sed for extracting metadata from markdown files --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3312ffc..0174d17 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -92,9 +92,9 @@ sync_file() { local file_title="" if [[ -f "${file}" ]]; then - file_space=$(grep -oP ')' "${file}" | head -1 || true) - file_parent=$(grep -oP ')' "${file}" | head -1 || true) - file_title=$(grep -oP ')' "${file}" | head -1 || true) + file_space=$(sed -n 's/.*.*/\1/p' "${file}" | head -1 || true) + file_parent=$(sed -n 's/.*.*/\1/p' "${file}" | head -1 || true) + file_title=$(sed -n 's/.*.*/\1/p' "${file}" | head -1 || true) fi local mark_args=(