Zastanawiasz się, jak wykonać jeden z tych rzeczy z C, tak, że utrzymuje się jak to będzie z ~/.bashrclub ~/.bash_profile:
export PATH=~/bin:$PATH
export PS1="$ "
Zastanawiam się, czy powinienem użyć execlpolecenia w taki sposób:
#include <stdio.h>
#include <unistd.h>
#include <dirent.h>
int main (void) {
return execl("/bin/export", "...", NULL);
}
Lub jeśli istnieje inny idiomatyczny sposób C, aby to osiągnąć poprawnie.