Administer > Deploy > Overview: WebSphere Commerce Build and Deployment tool > Customize the Build and Deployment tool > Custom Ant tasks


Dos2Unix task

Converts newline characters of a file or a set of files from CRLF (DOS) to CR (UNIX). The conversion is done in binary so that it also works on files of different encodings. Note that the task does not determine whether a file is binary before conversion - it is up to the user to isolate binary files from conversion. This task forms an implicit fileset that supports all attributes of fileset as well as nested include, exclude and patternset elements.


Parameters

Attribute Description Required
file The file for which newline characters are converted. Exactly one of the two
dir The directory from which to convert newline characters in files.
verbose Log the files that are being converted. No; Defaults to false


Examples

The following example converts README.txt in the base directory to UNIX newline format:

<dos2unix file="README.txt" />

The following example converts all files of HTML extension in the ${source.dir}/doc directory to UNIX newline format with verbose output:

<dos2unix dir="${source.dir}/doc" verbose="true"> 
    <include name="**/*.html" /> 
</dos2unix>


Related concepts

Overview: WebSphere Commerce Build and Deployment tool

Related reference

Custom Ant tasks


+

Search Tips   |   Advanced Search