In awk
. I am working on Solaris 10, so it's probably an old(er) version of awk
.
I came up with this rudimentary one-liner that works, at least for my particular input.
awk -F\; '$3 ~ /[ ]*...............................*/' file.csv
There may or may not be spaces around the separators hence the [ ]*
part of the regex.
Wanting to avoid printing 30 times the dot .
character, I tried the following:
awk -F\; '$3 ~ /[ ]*.\{30\}.*/{print $3}' file.csv
This did not return any result. If it helps in any way, I'm using ksh88
.
What would be the best way to avoid entering those 30 consecutive dots?
awk
man page says you need to pass--posix
or--re-interval
to enable interval expressions like{30}
. I don't have a Solaris 10 box to try it on, but theawk
on Solaris 8 doesn't support them