From f39bb5ca1b498d9b7fc556ff6026efc08b46ab8a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 23 Oct 2023 15:01:04 +0300 Subject: [s2] POSIX Reworked created and edited values to not use arrays --- csg | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/csg b/csg index 803ac74..870c88a 100755 --- a/csg +++ b/csg @@ -247,11 +247,15 @@ $($CSG_AWK -v titlef="$TITLEF" ' END { print title ORS desc ORS words }' "$file") EOF + local created edited + { read -r created; read -r edited; } << EOF +$($CSG_AWK -v file="$outf" ' BEGIN { FS = "\t" } $1 == file { - print $2 + print $2 ORS $3 exit - }' "$CSG_TIMESTAMP_FILE")) + }' "$CSG_TIMESTAMP_FILE") +EOF # Generate $CSG_MD_TO_HTML "$file" > "$outf" @@ -261,8 +265,8 @@ EOF -v title="$title" \ -v description="$descr" \ -v words="$words" \ - -v created="${timestamps[*]:0:3}" \ - -v edited="${timestamps[*]:3}" \ + -v created="$created" \ + -v edited="$edited" \ $scr_libs $scripts -f "$CSG_TMP_DIR/csg-print.awk" \ "$outf" > "$outf.tmp" mv "$outf.tmp" "$outf" -- cgit v1.3.1-23-gd82d