how to delete the method body in a class using the sed or awk or grep commands
sample source file: demo.php
<?php
class Demo {
private $a;
}
of course, there may be many methods in the class.
how to delete the method body in a class using the sed or awk or grep commands
sample source file: demo.php
<?php
class Demo {
private $a;
}
of course, there may be many methods in the class.
sed ':a;N;$!ba;s/public.*/}/' demo.php
modify the source file directly:
sed -i ':a;N;$!ba;s/public.*/}/' demo.php
Previous: Why does prerender-spa-plugin package report to Unable to prerender all routes??
Next: Introducing third-party css and js to MIME type in vue project index.html
the system is input by win10 with Git bash php artisan . The middle part of the content is garbled, a lot of blanks are left to the bottom, and then it is displayed normally as shown in figure . ...
system( git commit -a -m "quick commit" ); system( git push ); then build one in ~. Bash _ profile, wrote a shortcut alias push= php Users XXX Projects XY push.php but what I want to achieve is: suppose I enter push "GOOD BADDDD...
Mac builds the Nginx+PHP environment, using the built-in php-fpm, configuration file in etc php-fpm.conf,error_log ; Error log file 20 ; If it s set to "syslog", log is sent to syslogd instead of being written 21 ; into a local file. 22...