Solved

How to execute unix commands from ant script

Posted on 2003-11-19
6
2,818 Views
Last Modified: 2013-12-26
Hi,

  I am not sure if this is the correct place to ask, but i din't find any other category for Ant.
I am looking to run my ant script (buil.xml) having some unix commands. I am able to execute the java commands successfully.

I am typically looking for an shell script like the below to convert it to an ant script
#!/bin/ksh
sort -t, -d -k 1,1 -k 2,2  ./output/abc.dat > ./output/abcsort.dat
sort -t, -d -k 1,1 -k 2,2  ./output/xyz.dat > ./output/xyz.sort.dat
(where the dat files were comma separated files which need to be sorted)

thanks,
H
0
Comment
Question by:hyder
  • 3
6 Comments
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
check this script from Oracle
http://otn.oracle.com/sample_code/tech/xml/survey/index.html

this execute shell script with exec.
0
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
0
 
LVL 24

Expert Comment

by:shivsa
Comment Utility
any updates ???
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 250 total points
Comment Utility
<exec executable="sort" os="whatever">
  <arg line="-t, -d -k 1,1 -k 2,2  ./output/abc.dat > ./output/abcsort.dat"/>
</exec>
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by ahoffmann

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Importing  SSL Certificate into Firefox using GPO 28 192
paragon account problem 9 96
sum13 challenge 24 77
mapAB Challlenge 35 84
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now