diff --git a/scripts/bash/update-agent-context.sh b/scripts/bash/update-agent-context.sh index bba2415..4997158 100644 --- a/scripts/bash/update-agent-context.sh +++ b/scripts/bash/update-agent-context.sh @@ -311,8 +311,8 @@ create_new_agent_file() { done # Convert \n sequences to actual newlines - sed -i.bak2 's/\\n/\ -/g' "$temp_file" + newline=$(printf '\n') + sed -i.bak2 "s/\\\\n/${newline}/g" "$temp_file" # Clean up backup files rm -f "$temp_file.bak" "$temp_file.bak2"