Unix/ls: Difference between revisions

Content added Content deleted
(Frink)
(Added Bash / Unix Shell Implementation)
Line 1,563: Line 1,563:
=={{header|Tcl}}==
=={{header|Tcl}}==
<lang tcl>puts [join [lsort [glob -nocomplain *]] "\n"]</lang>
<lang tcl>puts [join [lsort [glob -nocomplain *]] "\n"]</lang>

=={{header|UNIX Shell}}==
ls sorts by default, if it doesn't work for you, pipe it's output to sort :
<lang bash>
Aamrun $ ls -1
Applications
Desktop
Documents
Downloads
KeyGenerator.png
Library
Movies
Music
My Projects
Pictures
Public
Aamrun $ ls -1|sort
Applications
Desktop
Documents
Downloads
KeyGenerator.png
Library
Movies
Music
My Projects
Pictures
Public
Aamrun $


=={{header|Ursa}}==
=={{header|Ursa}}==