{"id":18762191,"url":"https://github.com/straps/bash-scripts","last_synced_at":"2025-10-08T01:16:26.273Z","repository":{"id":140472869,"uuid":"1871166","full_name":"straps/bash-scripts","owner":"straps","description":"Bash Utility Scripts","archived":false,"fork":false,"pushed_at":"2011-06-09T15:25:51.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T18:19:42.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/straps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-09T14:43:16.000Z","updated_at":"2013-10-10T12:09:25.000Z","dependencies_parsed_at":"2023-03-13T09:15:18.631Z","dependency_job_id":null,"html_url":"https://github.com/straps/bash-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/straps/bash-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/straps%2Fbash-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/straps%2Fbash-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/straps%2Fbash-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/straps%2Fbash-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/straps","download_url":"https://codeload.github.com/straps/bash-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/straps%2Fbash-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505037,"owners_count":23618882,"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":[],"created_at":"2024-11-07T18:19:58.504Z","updated_at":"2025-10-08T01:16:21.224Z","avatar_url":"https://github.com/straps.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bash utility scripts\n\nScripts ordered alphabetically\n\n## pgdiff\n\nPostgreSQL diff update utility; tables must have the same structure for pgdiff to work\n\n    #Copy missing customers from database dbSrc to customers of dbDest database on localhost, finding missing records using the id field\n    pgdiff --db dbSrc --db2 dbDest --table customers --keyfld id\n\n    #Copy missing records from customers table of dbSrc on localhost, to dbDest on host 192.168.0.1, finding missing records using the id field\n    pgdiff --db dbSrc --host2 192.168.0.1 --db2 dbDest --table customers --keyfld id\n\n    #Copy missing records from 192.168.0.1 to localhost, database ecommerce, finding them by id\n    #The --comparefld compares the prog field and if it is greater in the source database, it replaces the entire record\n    pgdiff --db ecommerce --host 192.168.0.1 --host2 localhost --table orders --keyfld id --comparefld prog\n\nAdding the `--demo` option, updates are not executed but only showed on screen; really useful to see table differences\n\n**IMPORTANT**: --comparefld remove and reinserts founded records\n\n**VERY IMPORTANT**: I'm not responsible for usage of the software or for any software bug\n\n## smail\nSimple `sendmail` with stdin and multiple attachment support\n\nUsage Samples:\n\n    #Send simple email\n    smail -s 'simple email' -f from@email.com -t to@email.com -b 'email body'\n\n    #Send HTML email\n    smail -s 'html email' -f from@email.com -t to@email.com -c 'text/html' -b 'email body \u003cb\u003eHTML\u003c/b\u003e'\n\n    #Read body from file\n    cat file | smail -s 'stdin email' -f from@email.com -t to@email.com\n\n    #email with attachment\n    smail -s 'see attached file' -f from@email.com -t to@email.com -a file.jpg\n\n    #email with 2 files attached\n    smail -s 'see attached files' -f from@email.com -t to@email.com -a file1.jpg -a file2.pdf\n\n    #If an option is not know, it is appended to the subject\n    smail -s 'simple email' -f from@email.com -t to@email.com -b 'email body'\n    ### is the same of ###\n    smail simple email -f from@email.com -t to@email.com -b 'email body'\n\nAttachment support needs `uuencode` program; in ubuntu you can install it using `sudo apt-get install sharutils`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstraps%2Fbash-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstraps%2Fbash-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstraps%2Fbash-scripts/lists"}