32 lines
426 B
Awk
32 lines
426 B
Awk
|
|
#!/usr/bin/awk -f
|
||
|
|
|
||
|
|
#
|
||
|
|
# Ignore the header
|
||
|
|
#
|
||
|
|
NR == 1 { next }
|
||
|
|
|
||
|
|
#
|
||
|
|
# If field 2 (colour) is less than 6 characters then save it with its line
|
||
|
|
# number and skip it
|
||
|
|
#
|
||
|
|
length($2) < 6 {
|
||
|
|
skip[NR] = $0
|
||
|
|
next
|
||
|
|
}
|
||
|
|
|
||
|
|
#
|
||
|
|
# It's not the header and the colour name is > 6 characters, so print the line
|
||
|
|
#
|
||
|
|
{
|
||
|
|
print
|
||
|
|
}
|
||
|
|
|
||
|
|
#
|
||
|
|
# At the end show what was skipped
|
||
|
|
#
|
||
|
|
END {
|
||
|
|
printf "\nSkipped:\n"
|
||
|
|
for (n in skip)
|
||
|
|
print n": "skip[n]
|
||
|
|
}
|