Disclaimer: I am not looking on how to use the system()
function. I didn't really know how to phrase the title.
I am trying to use pushd
(not only pushd
, but this is the easiest example I could find) from inside a C program like this: system("pushd ~");
, but I get the following message: sh: 1: pushd: not found
I think I may need something like a pipe, but I'm not sure, and I'm not very familiar as to how this works. Sorry for the vague question, I don't really know how to explain better. Thanks for the help!