how do you replace a string of 4 digits with the same 4 digits, but padded with parentheses?
e.g. 2016 --> (2016)
i know how to find the 4 digit string, but not how to replace it
grep -E -o "[0-9]{4}"
>>54901068
install gentoo
let string = format!("({})", string);
to pad with strings "foo" and "bar"
sed -E 's/([0-9]{4})/foo\1bar/g'
>>54901068export TMP=1234
echo "($TMP)"
>>54901068(define (wrap str)
(string-append "(" str ")"))