You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/09/06 08:46:55 UTC

[DO NOT REPLY: Bug 3452] New: I suggest to add "input" attribute for the task exec as "output".

PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3452

*** shadow/3452	Wed Sep  5 23:46:55 2001
--- shadow/3452.tmp.18128	Wed Sep  5 23:46:55 2001
***************
*** 0 ****
--- 1,41 ----
+ +============================================================================+
+ | I suggest to add "input" attribute for the task exec as "output".          |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 3452                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.4                     |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Blocker                  OS/Version: All                     |
+ |     Priority: Other                     Component: Core tasks              |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: david_gu@huatek.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ By some case, we have to execute system command and redirect input/output to 
+ pecified files, such as initialize mysql database: 
+   mysql < init_db.sql >log.txt
+   
+   To run this kind of command by Ant is not very convenient, Because Ant only 
+ support output redirect and doesn't support input redirect. we have to specify 
+ os and do as: 
+ 
+   <exec executable="cmd" os="Windows 2000" output="log.txt">
+     <arg line="/c mysql &lt; init_db.sql>
+   </exec>
+   <exec executable="/bin/sh" os="Linux" output="log.txt">
+     <arg line="-c mysql &lt; init_db.sql>
+   </exec>
+ 
+   It's not convenient. my suggestion is to add "input" attribute for task exec. 
+ So that we can just write one line as:
+   <exec executable="mysql" input="init_db.sql" output="log.txt" />
+ and run it any where.
+ 
+   BTW, I met the problem for initialize mysql database in my project. If you 
+ have good suggestion. Please let me know.
+ 
+ Thanks & Best regards,
+ David