I met a disgusting person who asked me to change a code for 80 yuan, and he had to modify it remotely. It was originally a calling problem of the PHP backend. OK, let’s change it. But this guy saw that I finished it in a few minutes, so he asked me to modify the front-end page for him. I was speechless!
He only charges money for one question, but he wants to give money to one question for a bunch of questions. Is he really a technical cabbage?
I have dealt with a lot before. Every time I change something, I keep bargaining. When I modify someone's website or something, the starting price is 200. This guy lowers the price for me every time. I think he has a hard life, so I give him half the price. I will get it for 100. But this guy is ungrateful and wants to bargain. Is 50 okay? I ignored him, and after a while, 80, 80, help me get it done!
I said yes, then it would be 80. After I finished correcting the 80 problem, he started BBing again, no! There is another problem here, please help me fix it together!
I said yes, so I changed it for him. Maybe I was too kind. Damn it, every time I changed it, for a front-end problem, he insisted on asking me to change the back-end, and for a back-end problem, he insisted on me changing the front-end. In short, it was just money for one problem. He asked me to change two or three problems, but I refused, and then he said I was unreasonable!
hehe!
Today I finally couldn't stand it anymore!
After watching me change the code, I started to bb again, and started asking me to correct other problems. I said before, modify the back-end call, not including the modification of the front-end! He also scolded me for being dishonest and not doing anything after receiving money?
I actually threw up, it was so disgusting! I have been helping people modify their websites sporadically on the Internet for five or six years. I have solved hundreds of thousands of problems. I think the webmasters on the Internet are very considerate, but now I have broken the defense, brothers!
Linux replaces multiple line breaks with a single line break.
find . -name "*.php" -type f -exec sed -i 'N;/^\n$/d;P;D' {} +This code uses the GNU find and sed commands to process PHP files in the current directory.
The specific explanation is as follows:
find . -name "*.php":Use the find command to find all PHP files in the current directory and output the results to standard output.-type f:Specifies to search for files rather than directories or links.-exec sed -i 'N;/^\n$/d;P;D' {} +:Use the sed command to process each PHP file found. in,NIndicates to continue typing on a new line,/^\n$/dIndicates deleting the first and last lines,PIndicates copying the file contents to the buffer,DReplaces the buffer contents with the current line.{}Indicates the file name to be processed,+Indicates processing multiple files.-name "*.php":Use the find command again to find all PHP files in the current directory and output the results to standard output.
It should be noted that in this code-type fParameters may be ignored becausefind . -name "*.php"All PHP files can now be found. In addition, since the syntax of the sed command is relatively complex, it is recommended to check the syntax carefully to ensure the correctness of the code.