05-04-2008
cut a row into pieces
Terribly sorry wizards to bug you all again. There was an additional extraction I needed to perform. If I use the cut -f suggest above, I will get this interim text file:
1234 12.0000. 2/29/2008
1234 13.0000. 3/29/2008
However, I really want to create a text file that looks like this:
1234 12 0000 2/29/2008
1234 13 0000 3/29/2008
so that I can load into my Hyperion database. So if I can do one cut using -c (character/column) at multiple columns, that would give me the final result using only one "cut".
By the way, does anyone know of a software similar to UnixDos5.1a that will give me "awk" as well as "cut" Unix tools? UnixDos5.1a deficiency is that it does not have "awk" utility.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello!!
I have the text file with following format...
--SubTotal-----------------------------------0--161---------------44---13739369-67---
--SubTotal-----------------------------------0--147---------------0----49643---1----... (2 Replies)
Discussion started by: Danish Shakil
2 Replies
2. Shell Programming and Scripting
I have huge fixed width, text file in unix box and I need to extract columns found between the width 105 and 200 and output it to a new file.
Can anyone tell me how to extract it?
Thanks for your help. (1 Reply)
Discussion started by: kiran2k
1 Replies
3. Shell Programming and Scripting
Hi All,
Could you please help me with following:
I have to parse a .csv file.
For example: If the csv file contains 3 columns, then i have to print the column names. The field separator is (comma).
example.csv (contains 2 lines as follows)
This is,a test file, for validation... (2 Replies)
Discussion started by: vfrg
2 Replies
4. UNIX for Dummies Questions & Answers
Hello Gurus,
I have a text file containing nearly 12,000 tab delimited characters with 4000 rows. If the file size is small, excel can convert the text into coloumns. However, the file that I have is very big. Can some body help me in solving this problem?
The input file example,
... (6 Replies)
Discussion started by: Unilearn
6 Replies
5. UNIX for Dummies Questions & Answers
I have a text file that has three columns. But at the end of the text file, there are trailing lines that have missing second and third columns:
4 0.04972604 KLHL28
4 0.0497332 CSTB
4 0.04979822 AIF1
4 0.04983331 DECR2
4 0.04990344 KATNB1
4
4
4
4
How can I remove the trailing... (3 Replies)
Discussion started by: evelibertine
3 Replies
6. Shell Programming and Scripting
hello,
i have publicly available txt file with little less than 300000 rows. i want to extract from column 1 to column 218 and save it in another text file. i use the cut command but the file is saved with multiple rows from the source file onto a single row in the destination. basically it is... (6 Replies)
Discussion started by: madrazzii
6 Replies
7. Shell Programming and Scripting
Hello,
I want to concatenate 2-columns by 2-columns separated by colon. How can I do so? For example, I have a text file containing 6 columns separated by tab. I want to concatenate column 1 and 2; column 3 and 4; column 5 and 6, respectively, and put a colon in between.
input file:
1 0 0 1... (10 Replies)
Discussion started by: huiyee1
10 Replies
8. UNIX for Dummies Questions & Answers
Dear all,
I want to extract around 300 columns from a very large file with almost 2million columns. There are no headers, but I can find out which column numbers I want. I know I can extract with the function 'cut -f2' for example just the second column but how do I do this for such a large... (1 Reply)
Discussion started by: fndijk
1 Replies
9. Shell Programming and Scripting
I have a comma delimited file as per the one below and I am currently extracting the values in 2 columns (COL1 & COL6) to produce a smaller trimmed down version of the file which only contains the columns we need;
COL1,COL2,COL3,COL4,COL5,COL6,COL7,COL8,COL9... (1 Reply)
Discussion started by: Ads89
1 Replies
10. Shell Programming and Scripting
Kindly help merging information from two files with the following data structure.
I want to match for the CHR-SNP in Foo and get the columns that match from CHROM-rsID
Fields 1 & 2 of foo may have duplicates, however, a joint key of Fields $1$2$3$4 is unique.
Also would be helpful to clean up... (4 Replies)
Discussion started by: genehunter
4 Replies
LEARN ABOUT DEBIAN
output
OUTPUT(5) File Formats Manual OUTPUT(5)
NAME
output - output data file formats
DESCRIPTION
This manual page describes the output formats of the files created by the Yagi-Uda project's output program. The files are ASCII file, so
can be analysed with any graph plotting program.
Example of a .dat File
Below is a typical .dat file, for a 4ele 144-146MHz beam, optimised for a huge (and useless) FB.
# Driven=1 parasitic=3 total-elements=4 design=145.000MHz
# Checked from 144.000MHz to 146.000MHz.
f(MHz) E(deg) H(deg) R jX VSWR Gain(dBi) FB(dB) SideLobes(dB)
144.000 54.7 71.5 44.47 -2.35 1.136 9.386 21.944 16.650
144.500 54.0 70.1 41.34 -0.75 1.210 9.553 27.244 17.153
145.000 53.2 68.4 37.55 1.61 1.335 9.742 103.055 17.777
145.500 52.3 66.6 33.26 5.00 1.530 9.947 25.734 18.547
146.000 51.3 64.6 28.77 9.63 1.832 10.149 18.919 18.919
What is what in the .dat file
The f(MHz) column is the frequency (MHz) at which the data is evaluated at.
The E(deg) column is the approximate 3dB E-plane bandwidth calculated to the nearest 0.1 degree.
The H(deg) column is the approximate 3dB H-plane bandwidth calculated to the nearest 0.1 degree.
The (R) column is the input resistance in Ohms.
The (jX) column is the input reactance in Ohms.
The (VSWR) column is the input VSWR, usually refered to a 50 Ohm input, but this may be changed.
The Gain (dBi) column is the gain at theta=90 degrees, which is the forward direction of the beam. It is possible that a higher gain occurs
at other than 90 degrees, but this is not taken into account. The antenna is seriously at fault if this occurs.
The FB(dB) column is the front to back ratio in dB.
The Sidelobes(dB) column is the minimum level in dB down from the peak gain of any sidelobe. This is not calculated unless the '-c' option
is used, and then only on some optimisation techniques.
Example of a .gai File
The following is a small section of the .gai file.
f(MHz) theta gain-E(dBi) G(E)-peak phi gain-H(dBi) G(H)-peak
144.0000 -90.0000 -12.5584 -21.9444 -180.0000 -12.5584 -21.9444
144.0000 -45.0000 -7.3507 -16.7367 -135.0000 -3.5971 -12.9830
144.0000 0.0000 -999.0000 -1008.3860 -90.0000 -0.9010 -10.2870
144.0000 45.0000 0.1848 -9.2012 -45.0000 4.0261 -5.3599
144.0000 90.0000 9.3860 0.0000 0.0000 9.3860 0.0000
144.0000 135.0000 0.1848 -9.2012 45.0000 4.0261 -5.3599
144.0000 180.0000 -999.0000 -1008.3860 90.0000 -0.9010 -10.2870
144.0000 225.0000 -7.3507 -16.7367 135.0000 -3.5971 -12.9830
144.0000 270.0000 -12.5584 -21.9444 180.0000 -12.5584 -21.9444
What is what in the .gai file
The f(MHz) column is the frequency in MHz.
The theta column is the angle theta, for which the next two columns refer.
The gain-E(dBi) is the gain at theta, relative to an isotropic radiator. This is the E-plane gain. Hence at the peak (theta), this gives
the peak forward gain.
The G(E)-peak is the gain at theta, relative to the peak gain. Hence at the peak (theta=90 degrees), this is zero.
The phi column has nothing to do with the previous 3 columns. It is the angle for which the next two columns refer.
The gain-H(dBi) is the gain at phi, relative to an isotropic radiator. This is the H-plane gain. Hence at the peak (phi=0), this gives the
peak forward gain.
The G(H)-peak is the gain at phi, relative to the peak gain. Hence at the peak (phi=0 degrees), this is zero.
Example of a .up File
The .up file list the improvements made by optimise to an antenna design. Starting from the original design, the file is appended each time
a new better design is found. Here is an example, where the final line is the performance of the 4ele beam with the .dat file shown ear-
lier.
1 7.57dBi, 16.93dB F/B, Z=(31.77-56.34j) Ohms, VSWR=3.95, SL=16.95 dB
84 7.58dBi, 16.93dB F/B, Z=(31.78-56.32j) Ohms, VSWR=3.95, SL=16.95 dB
623 7.58dBi, 16.93dB F/B, Z=(31.78-56.28j) Ohms, VSWR=3.95, SL=16.95 dB
89345 9.74dBi, 103.06dB F/B, Z=(37.55 +1.61j) Ohms, VSWR=1.33, SL=17.78 dB
What is what in the .up file
The first column is an integer specifying the iteration. The other columns, going from left to right are gain(dBi), FB, input impedance,
VSWR and level of the most significant sidelobe, in dB down on the peak gain.
SEE ALS0
yagi(1), output(1), input(1), optimise(1), first(1) and yagi(5).
AUTHORS
Dr. David Kirkby G8WRB (david.kirkby@onetel.net), with help with converting to DOS from Dr. Joe Mack NA3T (mack@fcrfv2.ncifcrf.gov).
Version 1.16 24th October 2000 OUTPUT(5)