#!/bin/env bash HIGHLIGHT_COLOR="#cdd6f4" # text NORMAL_COLOR="#7f849c" # overlay1 TARGET_LINE=1 [ -n $1 ] && TARGET_LINE="$1" mapfile -t lines output="" for i in "${!lines[@]}"; do line_num=$((i + 1)) escaped_line=$(echo "${lines[$i]}" | sed 's/&/\&/g; s//\>/g') [[ $i -gt 0 ]] && output+=$'\n' # +="\n" is not properly displayed in eww if [[ $line_num -eq $TARGET_LINE ]]; then output+="$escaped_line" else output+="$escaped_line" fi done echo "$output"