Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
rm -f _sortpass
|
||||
|
||||
reset() {
|
||||
test -f _tosort || mv _sortpass _tosort
|
||||
}
|
||||
|
||||
bpass() {
|
||||
(read a; read b
|
||||
test -n "$b" -a "$a" && (
|
||||
test $a -gt $b && (reset; echo $b; (echo $a ; cat) | bpass ) || (echo $a; (echo $b ; cat) | bpass )
|
||||
) || echo $a)
|
||||
}
|
||||
|
||||
bubblesort() {
|
||||
cat > _tosort
|
||||
while test -f _tosort
|
||||
do
|
||||
cat _tosort | (rm _tosort;cat) |bpass > _sortpass
|
||||
done
|
||||
cat _sortpass
|
||||
}
|
||||
|
||||
cat to.sort | bubblesort
|
||||
Loading…
Add table
Add a link
Reference in a new issue