bash, display only in case output has count of n characters
Solution 1:
Some options:
grep ',....$' file
grep ',.\{4\}$' file
sed -n '/,....$/p' file
sed '/,....$/!d' file
sed -n '/,.\{4\}$/p' file
sed '/,.\{4\}$/!d' file
grep -E ',.{4}$' file
sed -En '/,.{4}$/p' file
sed -E '/,.{4}$/!d' file
gawk -F, 'length($2) == 4' file
perl -F, -lne 'print if length($F[1]) == 4' file