linux custom command: send http request with curl

File name: call

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

Increase scan command path

vi ~/.bash_profile

Add at the end of the file:

export PATH=$PATH:/home/yourpath/

Effective immediately:

source ~/.bash_profile

Custom command effect:

call "http:/xxxx"  "xxx"

 

Guess you like

Origin blog.csdn.net/x18094/article/details/113884592