in reply to System command is giving error if we redirect output to file

What does "not working" mean? What is the return value from system?

I'm guessing that it is the  "-i 3" argument that is wrong; this should probably be two arguments, not a single one.