linux自定义命令:用curl发送http请求

文件名:call

#!/bin/bash
echo ---$1
echo ---$2
curl $1 --connect-timeout 40 -m 40 -d "$2"

增加扫描命令路径

vi ~/.bash_profile

在文件末尾增加:

export PATH=$PATH:/home/yourpath/

立即生效:

source ~/.bash_profile

自定义命令效果:

call "http:/xxxx"  "xxx"

猜你喜欢

转载自blog.csdn.net/x18094/article/details/113884592