09-02-2015
Hi, Don.
Quote:
Originally Posted by
Don Cragun
Using sort -d works with the sample data given because ANT, BAT, and CAT (starting with A, B, and C) come before Dog, Duck, and Rat (starting with D and R). If ANT had been Ant and Dog had been DOG, sort -d would not put DOG before Ant.
Agreed ... cheers, drl
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
i have a data array as followes.
ARRAY=DFSG345GGG
ARRAY=234FDFG090
ARRAY=VDFVGBGHH
so on..........
i need all english letters to be change to lower case. So i am expecting to see
ARRAY=dfsg345ggg
ARRAY=234fdfg090
ARRAY=vdfvgbghh
so on........
If i have to copy this data in... (8 Replies)
Discussion started by: usustarr
8 Replies
2. Shell Programming and Scripting
Hello,
I have a big data file (160 MB) full of records with pipe(|) delimited those fields. I`m sorting the file on the first field.
I'm trying to sort with "sort" command and it brings me 6 minutes.
I have tried with some transformation methods in perl but it results "Out of memory". I was... (2 Replies)
Discussion started by: rubber08
2 Replies
3. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
4. Shell Programming and Scripting
Hi Experts,
I want to Sort the data in fixed width file where i have Header and Footer also in file.
I m using below commad to do the sort based on field satarting from 15 position to 17 position , but it is not ignoring the Header and Footer of the file while sorting. In the output i am... (5 Replies)
Discussion started by: sasikari
5 Replies
5. Shell Programming and Scripting
cat file1.txt
field1 "user1":
field2:"data-cde"
field3:"data-pqr"
field4:"data-mno"
field1 "user1":
field2:"data-dcb"
field3:"data-mxz"
field4:"data-zul"
field1 "user2":
field2:"data-cqz"
field3:"data-xoq"
field4:"data-pos"
Now i need to have the date like below.
i have just... (7 Replies)
Discussion started by: ckaramsetty
7 Replies
6. Shell Programming and Scripting
Hi. I am not sure the title gives an optimal description of what I want to do. Also, I tried to post this in the "UNIX for Dummies Questions & Answers", but it seems no-one was able to help out.
I have several text files that contain data in many columns. All the files are organized the same... (14 Replies)
Discussion started by: JamesT
14 Replies
7. Shell Programming and Scripting
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Discussion started by: rveri
3 Replies
8. UNIX for Advanced & Expert Users
I have a text file and each field is separated by semicolon ( ; ). Field number 7 is internally separated by comma ( , ) and pipe ( | ) symbol. I want to sort file based on three different fields which are marked in BOLD.
Here first BOLD field will have numbers upto the length of 9 characters,... (6 Replies)
Discussion started by: jnrohit2k
6 Replies
9. Shell Programming and Scripting
I have to sort below output in text file in unix bash
20170308
DA,I,113
20170308
PM,I,123
20170308
DA,U,22
20170308
PM,U,123
20170309
DA,I,11
20170309
PM,I,23
20170309
DA,U,123
20170309
PM,U,233 (8 Replies)
Discussion started by: Adfire
8 Replies
10. Shell Programming and Scripting
I have a string of pre defined ip address list which will always remain constant their order will never change like in below sample:
iplist=8.8.5.19,9.7.5.14,12.9.9.23,8.8.8.14,144.1.113
In the above example i m considering only 5 ips but there could be many more.
Now i have a file which... (15 Replies)
Discussion started by: mohtashims
15 Replies
LEARN ABOUT OSX
build.xml
build.xml(5) File Formats Manual build.xml(5)
NAME
build.xml - configuration file used by ant to build projects
DESCRIPTION
The file build.xml is the default configuration file used by ant to determine target to build for a specific project. It can be considered
the ant equivalent of Makefile..
The format of ant is XML and for each project a seperate file is constructed. The buildfile consists of one or more tasks. An example is
given below.
<project default="compile">
<target name="compile">
<javac srcdir="src">
</target>
</project>
This example has one target and it is defaulted. The target itself consists of one task javac which compiles the files in the src direc-
tory.
TARGETS
Targets can depend on other targets. These dependencies are given by the depends attribute of the <target> element.
TASKS
A task is a piece of code that is executed. Ant recognizes built-in task, optional tasks, but one can also write new tasks.
Built-in tasks
The built-in tasks are: Ant, AntCall, AntStructure, Apply, Available, Chmod, Copy, Cvs, Delete, Deltree, Echo, Exec, ExecOn, Fail, Filter,
FixCRLF, GenKey, Get, GUnzip, GZip, Jar, Java, Javac, Javadoc/Javadoc2, Mail, Mkdir, Move, Patch, Property, Replace, Rmic, SignJar, Sql,
Style, Tar, Taskdef, Touch, TStamp, Unjar, Untar, Unwar, Unzip, Uptodate, War, Zip
Java Executes a Java class within the running (Ant) VM or forks another VM if specified. Below are some of the attibutes to the <java>
element:
classname (required) the Java class to execute
fork if enabled triggers the class execution in another VM (disabled by default)
jvm the command used to invoke the Java Virtual Machine, default is java. The command is resolved by java.lang.Runtime.exec().
Ignored if fork is disabled.
Other arguments are classpath, classpathref, maxmemory, failonerror, dir and output.
Javac Compiles a source tree within the running (Ant) VM.
srcdir (required) location of the java files
destdir location to store the class files
debug indicates whether source should be compiled with debug information; defaults to off
optimize indicates whether source should be compiled with optimization; defaults to off
target generate class files for specific VM version (e.g., 1.1 or 1.2).
includes comma-separated list of patterns of files that must be included; all files are included when omitted
excludes comma-separated list of patterns of files that must be excluded; no files (except default excludes) are excluded when omit-
ted.
defaultexcludes indicates whether default excludes should be used (yes | no); default excludes are used when omitted.
Other arguments are includesfile, excludesfile, classpath, bootclasspath, classpathref, bootclasspathref, extdirs, encoding, depre-
cation, verbose, includeAntRuntime, includeJavaRuntime and failonerror.
Properties
A project can have a set of properties, which consist of a name value combination. Within tasks they can be used by placing them between
"${" and "}", as in "${builddir}/classes".
Built-in Properties
Ant provides access to all system properties as if they had been defined using a <property> task. For example, ${os.name} expands to the
name of the operating system.
basedir
the absolute path of the project's basedir (as set with the basedir attribute of <project>).
ant.file
the absolute path of the buildfile.
ant.project.name
the name of the project that is currently executing; it is set in the name attribute of <project>.
ant.java.version
the JVM version Ant detected; currently it can hold the values "1.1", "1.2" and "1.3".
Classpath
The classpath can be set by using the <classpath> element:
<classpath>
<pathelement path="${classpath}"/>
<pathelement location="lib/helper.jar"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset> </classpath>
SEE ALSO
ant(1)
AUTHOR
This manpage is made by Egon Willighagen <egonw@sci.kun.nl> and based on the Ant Manual <http://jakarta.apache.org/ant/manual/>.
Mac OS X September 22, 2004 build.xml(5)