bb/tool/sort/sort.go

19 lines
256 B
Go
Raw Normal View History

package sort
import (
"fmt"
"os"
"sort"
2023-12-04 13:49:01 +03:00
"github.com/omnipunk/bb/input"
2023-11-11 12:51:15 +03:00
"github.com/omnipunk/cli/mtool"
)
2023-03-24 16:54:51 +03:00
func Run(flagSet *mtool.Flags) {
lines, _ := input.ReadAllLines(os.Stdin)
sort.Strings(lines)
for _, l := range lines {
fmt.Print(l)
}
}