GithubHelp home page GithubHelp logo

bashlib's Introduction

#bash script lib This repositoriy contain some useful bash scripts and functions.

#DIR-bashrc ##.bash_alias* contain some useful command alias ##.bash_path* contain some variable of path ##.bashrc* my bashrc setting ##cmdrc.bat windows cmd auto run script
usage:change D:\yp\project\shell\share\bashrc\cmdrc.bat to your cmdrc.bat location,and run these command in your cmd.

reg add "HKLM\Software\Microsoft\Command Processor" /v "AutoRun" /t REG_SZ /d "D:\yp\project\shell\share\bashrc\win\cmdrc.bat" /f

##*.init.sh environment init

#DIR-lib ##const.sh some constant ##datafile.sh functions for process config files. use ~/bin/data/servers.dat config for example: servers.dat

serv123 192.168.1.100 22 user1 abc123
serv124 192.168.1.101 22 user1 abc123
serv125 192.168.1.102 22 user1 abc123
....

fields:

01 serv123: server name
02 192.168.1.100: server ip
03 22: server port
04 user1: server user
05 abc123: server user's password

filed 01 is the $1 todo:custom separate ##ftp.sh ftp functions ##ip.sh ip 2 location functions ##random.sh random num,ip,md5 generator ##redis.sh batch redis function ##str.sh string funtions

#other file ##gen_bash_srv.sh read server.dat,generate ssh login alias ##mklib.sh cat all lib file into one file ~/bin/lib.sh,then you can only import one file and use all functions,example: source ~/bin/lib.sh ##bauth batch ssh-copy-id of servers in ~/bin/data/servers.dat ##bssh batch ssh execute command ##scps super ssh,first you have run bauth,complete no password login download file: $ARG0 jmp:/data/home/file localfile download file: $ARG0 jmp:/data/home/file upload file:
$ARG0 file jmp:/data/home upload file to default folder:
$ARG0 file jmp ##scpb batch scp files ##dbs.sh mysql sql execute tool. ##redis redis tool ##swh swith host

#DIR-dependency

  • lib
    • mklib
    • ~/bin/data/servers.dat
      • bauth
        • bssh
        • scps
        • scpb
    • ~/bin/data/db.dat
      • db.sh
      • dbs.sh
    • ~/bin/data/redis.dat
      • redis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.