Unix/ls: Difference between revisions
Content added Content deleted
(Unix/ls en BASIC256) |
No edit summary |
||
Line 1,188: | Line 1,188: | ||
# Prints only the name of each file in the directory |
# Prints only the name of each file in the directory |
||
Get-ChildItem | Sort-Object Name | ForEach-Object Name | Write-Output</lang> |
Get-ChildItem | Sort-Object Name | ForEach-Object Name | Write-Output</lang> |
||
=={{header|PureBasic}}== |
|||
<lang PureBasic>NewList lslist.s() |
|||
If OpenConsole("ls-sim") |
|||
If ExamineDirectory(0,GetCurrentDirectory(),"*.*") |
|||
While NextDirectoryEntry(0) |
|||
AddElement(lslist()) : lslist()=DirectoryEntryName(0) |
|||
Wend |
|||
FinishDirectory(0) |
|||
SortList(lslist(),#PB_Sort_Ascending) |
|||
ForEach lslist() |
|||
PrintN(lslist()) |
|||
Next |
|||
EndIf |
|||
Input() |
|||
EndIf</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |