I have this Makefile, which has variables named "MODULES", which lists all the modules that I activated in my assembly.
This list is separated by spaces, so it looks like this when I do echo $(MODULES)
:
module1 module2 module3 module4 mod5 mod6 mod7 module8 module9
What I would like to do is present this list in some columns that will be displayed at compile time.
Like this:
Modules activated: module1 module2 module3 module4 mod5 mod6 mod7 module8 module9
Ideally, the withs column will adjust the width of the largest module in the column (see mod7
); and the number of columns will be adjusted according to the width of the current terminal.
Now I have found some unix utilities that seem to do this, such as column , but I cannot get it to work with my set.
Do you have any trick that would allow me to do this?
change
With the answer selected below, I finally cracked this command in the Makefile:
@printf '%s\n' $(MODULES) | sort | column
Gui13 source share