1. Preparation
For example, to create a script file for test.sh, the script code is as follows:
# ! /bin/bash echo Hello, world!
The function of the code is to output the characters Hello, world!
2. run the script
Switch to the directory where test.sh is located in the terminal and run the program, a Permission denied prompt appears, as follows:
[devel@localhost v2]$ ls test.sh [devel@localhost v2]$ chmod 111 test.sh [devel@localhost v2]$ ls [devel@localhost v2]$. / test.sh /bin/bash: ./test.sh: Permission denied
3.modify file permissions
This is that we can modify the file permissions with the help of the chmod command, as follows:
[devel@localhost v2] chmod 777 test.sh [devel@localhost v2] ./test.sh Hello,world!
add:
[devel@localhost v2] ./test_curl.sh profile_list get
Run the script, profile_list is the corresponding url, get is the request method.
end!