popen()에서 ls 명령어를 사용하는데 파일 없을때 결과를 화면에 출력되지 않게 하려면 어떻게 해야되는지 알려주십시오.popen("ls *.txt", "r"); 를 실행시키면 결과물이 나오는데 txt화일이 없을때 화면에 "*.txt not found" 이 출력됩니다. 이것을 화면에 출력되지 않게 하려면 어떻게 해야 하나요. 알려주세요!
popen("ls *.txt", "r");
popen("ls *.txt 2>/dev/null", "r");
[code:1]popen("ls *.txt 2>/d
popen("ls *.txt 2>/dev/null", "r");