in reply to How to Execute unix commands like "WC, tail, Gunzip, ZIP" against a file which is read from directory

You either need to
chdir($dir)
before running the UNIX commands, or pass the full path to them like
system("wc -l $dir/$file")
.
  • Comment on Re: How to Execute unix commands like "WC, tail, Gunzip, ZIP" against a file which is read from directory
  • Select or Download Code