#!/bin/bash s="12345, astringofrandomlength, anotherstringofrandomlength, 2019-01-01 12346, moreastringofrandomlength, otherstringofrandomlength, 2019-01-01" sed -e "s/\([[:alpha:]]\+\)/'\1'/g" <<< "$s" sed -E "s/([[:alpha:]]+)/'\1'/g" <<< "$s" sed "s/[[:alpha:]]\{1,\}/'&'/g" <<< "$s"
Standard input is empty
12345, 'astringofrandomlength', 'anotherstringofrandomlength', 2019-01-01 12346, 'moreastringofrandomlength', 'otherstringofrandomlength', 2019-01-01 12345, 'astringofrandomlength', 'anotherstringofrandomlength', 2019-01-01 12346, 'moreastringofrandomlength', 'otherstringofrandomlength', 2019-01-01 12345, 'astringofrandomlength', 'anotherstringofrandomlength', 2019-01-01 12346, 'moreastringofrandomlength', 'otherstringofrandomlength', 2019-01-01