06-30-2009
Fastest way is syncsort but i dont know if you would have that....
then try grep. dont use awk.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have an file which looks like
country address phone amount
sweden |address |phone | 10 |
Singapo |address |phone | 20 |
Italy-N |address |phone | 30 |
denmar |address |phone | 40 |
Here i need to do the sum(amount), how to do this in shell scripting
Thanks
Babu (11 Replies)
Discussion started by: ksmbabu
11 Replies
2. Shell Programming and Scripting
Dear All,
I am a newbie to shell scripting so this one is really over my head.
I have a text file with five fields as below:
76576.867188 6232.454102 2.008904 55.000000 3
76576.867188 6232.454102 3.607231 55.000000 4
76576.867188 6232.454102 1.555146 65.000000 3
76576.867188 6232.454102... (19 Replies)
Discussion started by: Ghetz
19 Replies
3. Shell Programming and Scripting
Hi,
I have two different files, one has two columns and other has only one column. I would like to compare the first column in the first file with the data in the second file and write a third file with the data that is not present is not common to them.
First file:... (26 Replies)
Discussion started by: swame_sp
26 Replies
4. Shell Programming and Scripting
Hi,
My first file has
592155 9 rs16916098 1
592156 19 rs7249604 1
592157 4 rs885156 1
592158 5 rs350067 12nd file has
9 rs16916098 0 113228129 2 4
19 rs7249604 0 58709070 4 2
2 rs17042833 0 113558750 4 2... (2 Replies)
Discussion started by: genehunter
2 Replies
5. Shell Programming and Scripting
Hi, Experts,
I have a requirement as following:
my source file:
a
a
a
b
b
c
c
c
c
I need add one more colume as following:
1 a
2 a
3 a
1 b
2 b
1 c
2 c (4 Replies)
Discussion started by: ken002
4 Replies
6. UNIX for Advanced & Expert Users
Hello everyone,
I am writing a script to process data from the ATP world tour.
I have a file which contains:
t=540 y=2011 r=1 p=N409
t=540 y=2011 r=2 p=N409
t=540 y=2011 r=3 p=N409
t=540 y=2011 r=4 p=N409
t=520 y=2011 r=1 p=N409
t=520 y=2011 r=2 p=N409
t=520 y=2011 r=3 p=N409
The... (4 Replies)
Discussion started by: imahmoud
4 Replies
7. Shell Programming and Scripting
Hello,
I have some tab delimited data and I need to move the last col. I could hard code it,
awk '{ print $1,$NF,$2,$3,$4,etc }' infile > outfile
but it would be nice to know the syntax to print a range cols.
I know in cut you can do,
cut -f 1,4-8,11-
to print fields 1,... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
8. Shell Programming and Scripting
Hi Friends,
This is the only solution to my task. So, any help is highly appreciated.
I have a file
cat input1.bed
chr1 100 200 abc
chr1 120 300 def
chr1 145 226 ghi
chr2 567 600 unix
Now, I have another file by name
input2.bed (This file is a binary file not readable by the... (7 Replies)
Discussion started by: jacobs.smith
7 Replies
9. Shell Programming and Scripting
Hi,
Please help with this.
I have several excel files (with and .xlsx format) with 10-15 columns each.
They all have the same type of data but the columns are not ordered in the same way.
Here is a 3 column example. What I want to do add the alphabet
from column 2 to column 3, provided... (9 Replies)
Discussion started by: newbie83
9 Replies
10. Shell Programming and Scripting
hello,
i have a undelimited file which contains 229 byte records. i want to change column 23 - 26 with a new value and also change the sign of the data in colulmn 30 - 70. i've tried SED for the first change, but nothing happens:
sed 's/\(^.\{22\}\).\{4\}\(.*\)/\0603\2/' inputfile
heres an... (8 Replies)
Discussion started by: blt123
8 Replies
LEARN ABOUT DEBIAN
mlpost
MLPOST(1) General Commands Manual MLPOST(1)
NAME
mlpost - wrapper around OCaml and Metapost for the Mlpost library
SYNOPSIS
mlpost [options] files...
DESCRIPTION
mlpost is a program that compiles OCaml files to PostScript or PDF files using the Mlpost library.
OPTIONS
-pdf Generate .mps files (default)
-mp Generate .mp files
-png Generate .png files
-ps Generate .1 files
-latex <main.tex>
Scan the LaTeX prelude
-eps Generate encapsulated postscript files
-xpdf WYSIWYG mode using xpdf remote server (the name of the remote server is "mlpost")
-v Be a bit more verbose. Otherwise nothing is printed except in case of error.
-ocamlbuild
Use ocamlbuild to compile
-native
Compile to native code
-ccopt <options>
Pass <options> to the Ocaml compiler
-execopt <options>
Pass <options> to the compiled program
-version
Print Mlpost version and exit
-no-magic
Do not parse mlpost options, do not call Metapost.dump
-depend
output dependency lines in a format suitable for the make(1) utility
-contrib <contrib-name>
compile with the specified contrib
-dumpable
output one name of dumpable file by line. So it print all the figures which will be created by the .ml file.
-get-include-compile {cmxa|cma|dir|file}
output the libraries which are needed by the library Mlpost if you want not to use the mlpost tool :
- cmxa print the needed cmxa file (opt version)
- cma print the needed cma file (byte version)
- dir print the directories needed to be include
- file print the file name inside this directory without extension
-compile-name <compile-name>
Keep the compiled version of the .ml file and name it <compile-name>.
-dont-execute
Don't execute the mlfile. So mlpost generates no figures. With this option you can check that a file compile without wasting time to
generate the figures. The options -dont-execute and -compile-name can be used in conjunction to create a program which generates
some figures according to some command line options.
-dont-clean
Don't remove intermediates files. The metapost backend use some intermediates files which are removed without this option.
-cairo Use the cairo backend instead of metapost
-t1disasm
Set the program used to decrypt PostScript Type 1 font, only with cairo (default built-in one). This option will disappear soon.
-help, --help
Display the list of options
SEE ALSO
mpost(1), ocamlc(1), xpdf(1).
AUTHOR
Mlpost was written by Romain Bardou, Francois Bobot, Johannes Kanig, Stephane Lescuyer and Jean-Christophe Filliatre.
This manual page was written by Stephane Glondu <steph@glondu.net> and completed by the Mlpost authors for the Debian project (but may be
used by others).
August 2009 MLPOST(1)