I want to get a list of applications and their output ports for some given list of applications, from my C program.
我不想使用类似东西。
ss -natp | awk /firefox/ { split($4,array,":"); printf "%d ", array[2]} END{print ""}
名单见41477 59505
。
What s an efficient way of calling ss once and then getting such this for all the applications? (Multiple output pipes? Is there an optimal way to use awk for many matches? Catting ss to a file and then awk-ing many it many times?)
感谢!