The justification type options -c,-j,-l,-r,-x,-X described below apply to the columns which follow them as arguments, or to all columns if none are specified on the command line. If the last argument is a justification option, then all columns not named on the command line will be justified according to that type.
$ cat credit Name Credit ---- ------- Anderson 23.49 Ho 145.98 Johnson 1.1$ justify < credit Name Credit -------- ------ Anderson 23.49 Ho 145.98 Johnson 1.10
In the table below, we want the Item column centered; the Value column to be formated with commas, and all the other columns to have default justification:
$ cat inventory Item Amount Cost Value Description ---- ------ ---- ----- ----------- 1 4 50.1 rubber gloves 2 100 5.230 500 test tubes 3 5 80 400 clamps 4 23 19 437 plates 5 99 24 2376 cleaning cloth 6 89 147 13083 bunsen burnersSEE ALSO$ justify -c Item -x Value -j < inventory Item Amount Cost Value Description ---- ------ ------- ------ -------------- 1 4 50.10 150 rubber gloves 2 100 5.230 500 test tubes 3 5 80 400 clamps 4 23 19 437 plates 5 99 24 2,376 cleaning cloth 6 89 147 13,083 bunsen burners