I want to run system command in PHP.But when I run file I am getting error. My Command like.I want to run awk command.
Code:
$awk="awk '{print $1,$NF}' stat.txt";
$awkop=shell_exec($awk);
Output:
awk: {print $1,}
awk: ^ syntax error awk: cmd. line:1: {print $1,}
awk: cmd. line:1: ^ unexpected newline or end of string