I am working on PHP file and want to delete the first line from a text file.
Here is my code:
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c \"sed '1d' $text_files_path/diffFile.txt\"");
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c 'sed '1d' $text_files_path/diffFile.txt'");
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c 'tail -n +2 $text_files_path/diffFile.txt'");
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c \"tail -n +2 '$text_files_path/diffFile.txt'\"");
But, nothing works!
Any idea please?