Skip to content

Instantly share code, notes, and snippets.

View RustyNails8's full-sized avatar

Sumit Das RustyNails8

View GitHub Profile
@RustyNails8
RustyNails8 / bash-smtp-auth-email
Created June 9, 2019 07:56 — forked from fbatschi/bash-smtp-auth-email
How to send an email from bash via SMTP Auth
echo "PUT YOUR MAIL BODY HERE" | mailx -s "SUBJECT" -S smtp=smtp://yoursmtpserver.com -S smtp-auth=login -S smtp-auth-user=YOUR_USERNAME -S smtp-auth-password=YOUR_PASSWORD -S from="Sender Name <sender@mail.com>" recipient@mail.com
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@RustyNails8
RustyNails8 / hostAgentStuff.sh
Created April 14, 2023 18:52 — forked from wuftymerguftyguff/hostAgentStuff.sh
Useful SAP HostAgent commands
#GET A LIST OF INSTANCES
#/usr/sap/hostctrl/exe/saphostctrl -function Listinstances -format Script
#GET A LIST of databases
saphostctrl -nr 99 -function Listdatabases
# manage a db with the host agent
# /usr/sap/hostctrl/exe/saphostctrl -nr 99 -function StopDatabase -dbname NPL -dbtype ada -user sapadm passwd
#query a db with the host agent