Хорошо, я нашел решение для этого:
preg_match_all('/(<system>.*<\/system>)/ms', file_get_contents('./myinputfile'), $xmlinit);
$output=$xmlinit[0][0]
file_put_contents('./myoutputfile', $output );
Рекомендации по улучшению приветствуются!
Нет никакой разницы. Изman kill
:
The default signal for kill is TERM.
kill -s TERM <pid>
не расширяет переменную TERM
, как это сделало бы kill -s $TERM <pid>
. Он использует строку TERM
.
Соответствие между номерами сигналов и именами находится в man 7 signal
. Кроме того, из спецификации POSIXkill
(мой курсив ),
-s signal_name
Specify the signal to send, using one of the symbolic names defined in the <signal.h> header. Values of signal_name shall be recognized in a case-independent fashion, without the SIG prefix. In addition, the symbolic name 0 shall be recognized, representing the signal value zero. The corresponding signal shall be sent instead of SIGTERM.
kill
из GNU coreutils (версии 8.32, которую я установил ), имеет опцию --table
или -L
, которая выводит эту информацию:
1 HUP Hangup: 1
2 INT Interrupt: 2
3 QUIT Quit: 3
4 ILL Illegal instruction: 4
5 TRAP Trace/BPT trap: 5
6 ABRT Abort trap: 6
7 EMT EMT trap: 7
8 FPE Floating point exception: 8
9 KILL Killed: 9
10 BUS Bus error: 10
11 SEGV Segmentation fault: 11
12 SYS Bad system call: 12
13 PIPE Broken pipe: 13
14 ALRM Alarm clock: 14
15 TERM Terminated: 15
16 URG Urgent I/O condition: 16
17 STOP Suspended (signal): 17
18 TSTP Suspended: 18
19 CONT Continued: 19
20 CHLD Child exited: 20
21 TTIN Stopped (tty input): 21
22 TTOU Stopped (tty output): 22
23 IO I/O possible: 23
24 XCPU Cputime limit exceeded: 24
25 XFSZ Filesize limit exceeded: 25
26 VTALRM Virtual timer expired: 26
27 PROF Profiling timer expired: 27
28 WINCH Window size changes: 28
29 INFO Information request: 29
30 USR1 User defined signal 1: 30
31 USR2 User defined signal 2: 31