I am trying to find the total size of the libc.a module using the unix size command.
When running it, I get a lot of different files total sizes. What is one possible way in which I can take one column of the output of ‘size’ (the column dec in this case which has the total size of the file in decimal) and add them up?
Is that possible to do in the command line?
One way to do this:
The steps:
sizeto generate the ouputawkto print the fourth field inserted between spacestailto print from the second line (ie. skip the first line)pasteto join all the lines, separated by a+xargsto pass the result as a parameter toexpr.exprto add up the values