system commands are not working in system function

whenever I'm trying to use system function I'm getting the below error.

code:

library(base)
system("ipconfig")

error:
sh: 1: ipconfig: not found
Warning message:
In system("ipconfig") : error in running command

ipconfig is a windows utility, I would expect your code to work (return a result) on a Windows machine, and fail in the manner you described on a non windows machine (Linux/MacOS)

p.s. base is always loaded for you so you can save a line of code by not loading it.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.