🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

bigsort

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigsort

sort big file or streams

0.2.2
PyPI
Maintainers
1

bigsort

sort or shuffle big file/stream

usage

pip install bigsort

shell

bigsort -i  readme.md -o sorted.txt  # default sort in increase 
cat readme.md |  bigsort --sortType=d --unique=1 > sorted.txt  # sort pipe, order in descend, unique
bigsort -i sorted.txt -c ">"  # check order
bigsort -i  readme.md --unique=1   | bigsort --sortType=R > sorted.txt   # unique and shufle 
head -c 100000000  /dev/urandom  | python bigsort.py -C=1000 -m=0.999 --sortType=R -T="./" > sorted.txt
wc -l *.py | bigsort   -k 1n,2  -b 1 -t " "   # sort by key
bigsort -i  readme.md -s R -g 10   # get first 10 lines

python

import os
from bigsort import  bigsort, sortFile, check

# sort in file
sortFile("cat readme.md","sorted.txt")
check(open("sorted.txt"),"<=")

# sort in pipe
bigsort(os.popen("cat readme.md"),open("sorted.txt",'w'),unique=1,sortType="d")
check(open("sorted.txt"),">")

custom sort

Keywords

bigsort

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts