[root@localhost ~]# vim eof.sh #!/bin/bash mysql -uroot -p123456 <<EOF use test; create table data(name varchar(15),age int,address varchar(25)); desc test.data; insert into data values("tom",23,"china"); select * from data; exit EOF
4.1 运行脚本查看执行结果
1 2 3 4 5 6 7 8 9
[root@localhost ~]# bash eof.sh //运行脚本,查看数据库中信息 mysql: [Warning] Using a password on the command line interface can be insecure. Field Type Null Key Default Extra name varchar(15) YES NULL age int(11) YES NULL address varchar(25) YES NULL
cat << "EOF" > ~/.gitconfig # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source"${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme EOF