from a file (/etc/services) i need to take out all services, exluding all double or more entries per service, exluding lines starting with '#', sort alfabetically and store to a file. After all this was succesful, i need to count the lines. Adn this is where i struggle: to apply the wc -l command... so far i have:
cut -f 1 etc/services | sed ‘/^#/ d‘ | sort | uniq -u > uniqueservices.txt
Could you help me out?