1, file descriptor -e Determine whether the object exists
-d Determine whether the object exists and is a directory
-f Determine whether the object exists, and it is a regular file
-L Determine
Category: Unix
The UNIX operating system (Eunice) is a powerful multi-user, multi-tasking operating system that supports multiple processor architectures. According to the classification of the operating system, it is a time-sharing operating system. It was first developed by KenThompson, Dennis Ritchie and Douglas McIlroy in 1969 Developed in AT&T’s Bell Labs in the year. At present, its trademark rights are owned by the International Open Standards Organization, and only UNIX systems that conform to a single UNIX specification can use the name UNIX, otherwise it can only be called UNIX-like (UNIX-like)
Strive_tan shell programming actual combat 2-distribution system
1. Expect applications
1) Transfer files
2) Execute commands remotely, no interaction, no need to enter a password
3) The core of the online shell script (tool) is expect, which i
Shell Training Day8 8.22
while loop
? Syntax while condition; do…; done
? Case 1
#!/bin/bash
while :
do
load=w|head -1|awk -F’load average: ”{print $2}’|cut -d. -f1
if [$load -gt 10 ]
then
top|mail -s “load is high:
Shell script prints parallelogram, diamond
Shell script printing parallelograms #!/bin/ bash
for ((i=1;i<= 9;i++))
do
for ((j=9;j>=i;j- -))
do
echo -n ” ”
done
for ((j=2;j<= i;j++)) do echo -n "*" done for ((j=1;j<
VIM command interpretation summary; mount usage and redundant backup disks of redundant disk arrays
IM pt
Configuring the application service in the Linux system is actually modifying its configuration file (there may be multiple configuration files, which contain different parameters), whi
Shell for loop demo
test.sh
#!/bin/bash
for skill in Ada Coffe Action Java; do
echo “I am good at ${skill}Script”
done Output
bogon:Desktop macname$ ./test.sh
I am good at AdaScript
I am good at Cof
YUM installer UnicodedecodeError
yum Installer Times Exception UnicodeDecodeError Traceback (most recent call last):
File “/usr/bin/ yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yu
Shell Programming: Use scripts to achieve NGINX’s guardianship restart
nginx_daemon.sh #!/bin/bash
#
this_pid=$$
while true
do
ps -ef | grep nginx | grep -v grep | grep -v $ this_pid &> /dev/null
if [$? -eq 0 ];then
echo ” nginx is ok”
sleep 3
else
JMeter Beanshell assertion
This article is used to record the problems encountered in writing beanshell assertions.
Question 1: JSONObject not found in namespace
Process: Write the code under beanshell as follows
Command history and automatic logout
Environment variable location
System environment variable location: /etc/profile
User environment variable location: /home/usr
Command history modification
The command histo