Mi piacerebbe sapere se esiste un modo per catarchiviare come php.inie rimuovere tutte le righe che iniziano con;
Ad esempio, se il file conteneva questo:
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors except for notices
;
error_reporting = E_ALL & ~E_NOTICE
e ho eseguito il comando corretto cat | {remove comments command}, quindi avrei finito con:
error_reporting = E_ALL & ~E_NOTICE
Nota - ho pensato che catsarebbe stato il modo migliore per fare questo, ma in realtà sto bene con la risposta utilizzando un altro programma di utilità come awk, sed, egrep, etc.
catè lo strumento per concatenare i file. grepè lo strumento per filtrare le linee in base ai motivi. sede awkpuò anche modificare quelle righe.
error_reporting = E_ALL & E_NOTICE ; Show all errors, except for notices? Il commento dovrebbe essere rimosso anche in quel caso?