自动执行脚本的交互式输入

https://blog.csdn.net/qq_41565459/article/details/84108673

 原来的脚本运行命令是
 bash <(wget -qO- https://imtx-bucket.oss-cn-shenzhen.aliyuncs.com/linux/sh/swap.sh)
 ​
 写成这样,就相当于用户先输入1,按回车,在输入512,按回车
 echo -e "1\n512" | bash <(wget -qO- https://imtx-bucket.oss-cn-shenzhen.aliyuncs.com/linux/sh/swap.sh)