c++ - 为 sql loader 禁用 c++ 输出消息

标签 c++ linux g++ sql-loader

我有一个 C++ 代码,其中我使用 system() 使用 sql 加载程序。当 SQL Loader 在运行代码时执行时,我收到了下面提到的我想禁用的消息:

SQL*Loader: Release 10.2.0.1.0 - Production on Thu Mar 14 14:11:25 2013

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Commit point reached - logical record count 20
Commit point reached - logical record count 40
Commit point reached - logical record count 60
Commit point reached - logical record count 80

最佳答案

请记住,system 函数使用 shell 来执行命令。所以你可以使用普通的 shell 重定向:

system("/some/program > /dev/null");

关于c++ - 为 sql loader 禁用 c++ 输出消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15405448/

相关文章:

c++ - std::nth_element 和 std::sort 之间的实际区别是什么?

C++ 逻辑与运算符

linux - 彩色 shell 脚本输出库

c++ - 我在这里没有正确使用 typeof() 吗?

c++ - 如何更改makefile中g++的版本

c++ - C++ 指针的新手;试图从指向父类的指针 vector 中检索子对象。帮助将不胜感激

c++ - 如果返回值未用于特定类型,则编译失败

linux - 使用 fdupes 命令删除重复文件

linux - 使用 Bash 脚本从 xdotool 搜索结果中检索单个元素

c++ - 为什么Codelite不创建Make文件?