Align columns: Difference between revisions
Content added Content deleted
Line 2,288: | Line 2,288: | ||
SET exampletext=JOIN(new1,"$",new2,new3,new4,new5,new6,new7,new8,new9,new10,new11,new12) |
SET exampletext=JOIN(new1,"$",new2,new3,new4,new5,new6,new7,new8,new9,new10,new11,new12) |
||
</lang> |
</lang> |
||
Output: |
|||
<pre> |
|||
Given $ a $ text $ file $ of $ many $ lines, $ where $ fields $ within $ a $ line$ |
|||
are $ delineated $ by $ a $ single $ 'dollar' $ character, $ write $ a $ program $ $ |
|||
that $ aligns $ each $ column $ of $ fields $ by $ ensuring $ that $ words $ in $ each$ |
|||
column $ are $ separated $ by $ at $ least $ one $ space. $ $ $ $ |
|||
Further, $ allow $ for $ each $ word $ in $ a $ column $ to $ be $ either $ left$ |
|||
justified, $ right $ justified, $ or $ center $ justified $ within $ its $ column. $ $ $ |
|||
</pre> |
|||
=={{header|Unix Shell}}== |
=={{header|Unix Shell}}== |