linux - Why PROMPT_COMMAND seems to be empty when i acces using system system call in c -
i have defined prompt_command
in /etc/profile
shown below,
prompt_command = date
now when print prompt_command
c code using system system call shown below not displaying anything,
system("echo pwd;echo whoami;echo \"p_cmd = $prompt_command\";eval $prompt_command");
output:
\root root p_cmd =
please clarify following doubt
why prompt_command
showing empty?
you prompt_command
has not been exported, try:
export prompt_command=date