{"id":17055104,"url":"https://github.com/yhabteab/trainee-cpp-sort","last_synced_at":"2025-03-23T06:14:44.979Z","repository":{"id":75593954,"uuid":"262275448","full_name":"yhabteab/trainee-cpp-sort","owner":"yhabteab","description":" Trainee-cpp-sort is an imitation of the satandard sort command. I recommend to use this only for test and learning purposes. I developed this sort program so that I can gradually learn to use C ++.","archived":false,"fork":false,"pushed_at":"2020-09-23T14:24:55.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T12:43:51.618Z","etag":null,"topics":["command-line-arguments-parser","cpp","cpp-sort","how-to-code","options-parsing","sort","sort-commands","sort-options","sortable","sorter","sorting-algorithms","sorting-algorithms-implemented","trainee-cpp-sort"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yhabteab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-08T09:00:39.000Z","updated_at":"2023-02-23T22:48:57.000Z","dependencies_parsed_at":"2023-03-03T13:16:10.558Z","dependency_job_id":null,"html_url":"https://github.com/yhabteab/trainee-cpp-sort","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhabteab%2Ftrainee-cpp-sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhabteab%2Ftrainee-cpp-sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhabteab%2Ftrainee-cpp-sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yhabteab%2Ftrainee-cpp-sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yhabteab","download_url":"https://codeload.github.com/yhabteab/trainee-cpp-sort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061373,"owners_count":20554563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-arguments-parser","cpp","cpp-sort","how-to-code","options-parsing","sort","sort-commands","sort-options","sortable","sorter","sorting-algorithms","sorting-algorithms-implemented","trainee-cpp-sort"],"created_at":"2024-10-14T10:16:43.792Z","updated_at":"2025-03-23T06:14:44.969Z","avatar_url":"https://github.com/yhabteab.png","language":"C++","readme":"# trainee-cpp-sort\n\n## About\n\ntrainee-cpp-sort is a program that has been developed from the beginning and should be an imitation of the standard sort \ncommand. It was only developed for learning and testing purposes, so I cannot guarantee that it will work perfectly with\na real complicated program.\n\nquick sort and merge sort algorithm have also been added to the program, so that with various sort options you have ample\nopportunities to simplify your work.\n\n\nTo learn more about what they mean and what they are for, see the bunch of sort options below.\n### Parameters\n| short Options | long Options      |                 Usage |\n| ----------- | ----------- |  ---------------- |\n| -b  | --ignore-leading-blanks   |    Ignore leading blanks.       |\n| -f  | --ignore-case   |    Ignore case e.g (uppercase or lowercase) this would be ignored.       |\n| -n  | --numeric-sort   |    Numeric sort from the lowest the highest.       |\n| -o  | --output[ARG required]   |    Write result in FILE instead of standard output.       |\n| -r  | --reverse   |    Reverse the result of sorting.       |\n| -R  | --random-sort   |    Sort the keys using a random hash.       |\n| -u  | --unique   |    Only output the first of several matches.       |\n| -q  | --quick-sort | Use quick sort Algorithm.       |\n| -m  | --merge-sort  | Use merge sort Algorithm.       |\n| -h  | --help  | Display this help and exit the Program.       |\n\n\n### Examples of sort commands..\n\nFirst of all we have to compile our code and this is done by doing the command as follows ``./build.sh``. This will compile and build your code. \nIf ``./build.sh`` doesn't work for you, you can try ``chmod +x build.sh`` and it should work now. \nAnd the compiled code is saved in the ``cpp-sort`` file as ``machine code``.\n\nNow we can e.g. execute this command to sort the contents of the ``in.txt`` file ``numeric-sort``.\ncontent of ``in.txt`` file:\n```\n4\n9\n6\n15\n10\n3\n12\n8\n7\n```\nThe output looks like this, if you run this command \n``./cpp-sort -n in.txt`` OR ``./cpp-sort -n \u003c in.txt``.\n```\n3\n4\n6\n7\n8\n9\n10\n12\n15\n```\n\nif you would like to sort with quick sort or merge sort you only have to change a little bit when executing \nthe commands as follows``./cpp-sort -q -n in.txt`` OR ``./cpp-sort --quick-sort -n \u003c in.txt`` \n\nAnd we do the same with merge sort``./cpp-sort -m -n in.txt`` OR ``./cpp-sort --merge-sort -n \u003c in.txt``.\nThey all work like clockwork.\n\n\nAnd if you want to store the sorted values ​​in a new file, you only have to do as follows.. \n\n``./cpp-sort -n -o output.txt in.txt`` OR ``./cpp-sort -n --output output.txt \u003c in.txt``\n then check the ``output.txt`` file.\n### CONTRIBUTING\nI hope you have as much fun with it as I have when coding and would be very happy if you would develop the program \nfurther or if you could give me suggestions how I can do it even better. \n\nYour are always welcome to contribute in this repository\n\nThank you :+1:\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhabteab%2Ftrainee-cpp-sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyhabteab%2Ftrainee-cpp-sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyhabteab%2Ftrainee-cpp-sort/lists"}