Skip to content

Instantly share code, notes, and snippets.

View basu021's full-sized avatar
🏠
Working from home 😃

BASUDEV ROUT basu021

🏠
Working from home 😃
View GitHub Profile
#!/bin/bash
# Telegram Bot Token
TOKEN="6830599987:AAHWoCdShN_potBq7xP6BxR52nuDyf10pT8"
# Telegram Bot API URL
API_URL="https://api.telegram.org/bot$TOKEN"
# Function to send photo to Telegram
send_photo() {
@basu021
basu021 / search_text.sh
Created November 9, 2023 09:22
This script accepts the following options: -d: Specify the directory to start the search (default is the current directory). -e: Specify file extensions separated by commas. -o: Specify search options (default is to recursively search in subdirectories). The script also accepts multiple search texts as arguments, separated by spaces. bash script…
#!/bin/bash
# Define the directory to start the search
SEARCH_DIR="."
# Define default file extensions and search options
FILE_EXTENSIONS=("txt")
SEARCH_OPTIONS="-r" # Default: recursively search in subdirectories
# Parse command line arguments
@basu021
basu021 / innodb_ndb_migration.sh
Last active November 9, 2023 08:14
create database dump from innodb to ndb cluster. Here two files will be generated one is structure and another one contains data. Restore structure first then import data.
#!/bin/bash
# MySQL Database Information
DB_USER="YOUR_DBA_USER"
DB_PASSWORD="DBA_PASSWORD"
HOST="HOSTNAME"
# Output directory
OUTPUT_DIR="/home/rhel/temp"