Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/straps/bash-scripts
Bash Utility Scripts
https://github.com/straps/bash-scripts
Last synced: about 2 months ago
JSON representation
Bash Utility Scripts
- Host: GitHub
- URL: https://github.com/straps/bash-scripts
- Owner: straps
- Created: 2011-06-09T14:43:16.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-06-09T15:25:51.000Z (over 13 years ago)
- Last Synced: 2024-04-14T09:07:39.775Z (9 months ago)
- Language: Shell
- Homepage:
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bash utility scripts
Scripts ordered alphabetically
## pgdiff
PostgreSQL diff update utility; tables must have the same structure for pgdiff to work
#Copy missing customers from database dbSrc to customers of dbDest database on localhost, finding missing records using the id field
pgdiff --db dbSrc --db2 dbDest --table customers --keyfld id#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
pgdiff --db dbSrc --host2 192.168.0.1 --db2 dbDest --table customers --keyfld id#Copy missing records from 192.168.0.1 to localhost, database ecommerce, finding them by id
#The --comparefld compares the prog field and if it is greater in the source database, it replaces the entire record
pgdiff --db ecommerce --host 192.168.0.1 --host2 localhost --table orders --keyfld id --comparefld progAdding the `--demo` option, updates are not executed but only showed on screen; really useful to see table differences
**IMPORTANT**: --comparefld remove and reinserts founded records
**VERY IMPORTANT**: I'm not responsible for usage of the software or for any software bug
## smail
Simple `sendmail` with stdin and multiple attachment supportUsage Samples:
#Send simple email
smail -s 'simple email' -f [email protected] -t [email protected] -b 'email body'#Send HTML email
smail -s 'html email' -f [email protected] -t [email protected] -c 'text/html' -b 'email body HTML'#Read body from file
cat file | smail -s 'stdin email' -f [email protected] -t [email protected]#email with attachment
smail -s 'see attached file' -f [email protected] -t [email protected] -a file.jpg#email with 2 files attached
smail -s 'see attached files' -f [email protected] -t [email protected] -a file1.jpg -a file2.pdf#If an option is not know, it is appended to the subject
smail -s 'simple email' -f [email protected] -t [email protected] -b 'email body'
### is the same of ###
smail simple email -f [email protected] -t [email protected] -b 'email body'Attachment support needs `uuencode` program; in ubuntu you can install it using `sudo apt-get install sharutils`