Hii ,I am new to Unix ,i have a flat file which is (fixed length) sitting in unix,Which is holding the data for a table.I want to extract one column(length7-10) on the basis of another column(length13-15) and want only one single row
Example:
Below is the sample of flat file.
Result required:
I want 100 on the basis of AAAA
Hi all,
I'm new in the unix environment. I'm having a challenge in extracting data from a flat file and convert it to a CSV file format or I should be able to open it with MS Excel.
The input data in my flat file looks like this:
AV00001001155000063637143326711145412082EM SITHOLE... (3 Replies)
Hi, all.
I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file:
10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783
19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657
And this is the expected... (2 Replies)
I have a fixed length file that need to be sorted according to the following rule
IF B=1 ORDER by A,B
Else ORDER by A,C
Input file is
ABC
131
112
122
231
212
222
Output needed
ABC
112
131
122
212
231
222 (1 Reply)
Hi All,
So far, I've been extracting data from db2 tables and exporting the file as a tab delimited file into a UNIX server using the following command:
export to /.../.../.../.../.../SM_RAW_DATA.dat of del modified by coldel| nochardel
select a.accno,
a.CUR_BL_AM, ... (1 Reply)
Hi Gurus,
Thanks in advance...
I am new to writing shell scripting and help me out reading a flat file with fixed length.
I have a fixed length flat file with storename(lenth 6) , emailaddress(lenth 15), location(10). There is NO delimiters in that file.
Like the following str00001.txt... (2 Replies)
I am new to shell scripting and I have to to the following
I have a flat file with storename(lenth 20) , emailaddress(lenth 40), location(15). There is NO delimiters in that file.
Like the following str00001.txt
StoreName emailaddress location... (3 Replies)
Hi
Can somebody help me with solution for this PLEASE?
I have a flat file and need to insert delimiters at fixed positions in all the lines so that I can easily convert into EXCEL with columns defined as per their width.
For Example
Here is the file
{
kkjhdhal
sdfewss
sdtereetyw... (7 Replies)
Hello Everyone,
I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table.
Input Data-
------ ------------------------ ---- -----------------
WFI001 Xxxxxx Control Work Item A Number of Records
------ ------------------------... (5 Replies)
I have a fixed width file of length 53. when is try to get the lengh of the record of that file i get 2 different answers.
awk '{print length;exit}' <File_name>
The above code gives me length 50.
wc -L <File_name>
The above code gives me length 53.
Please clarify on... (2 Replies)
Discussion started by: Amrutha24
2 Replies
LEARN ABOUT DEBIAN
stag-flatten
STAG-FLATTEN(1p) User Contributed Perl Documentation STAG-FLATTEN(1p)NAME
stag-flatten - turns stag data into a flat table
SYNOPSIS
stag-flatten -c name -c person/name dept MyFile.xml
DESCRIPTION
reads in a file in a stag format, and 'flattens' it to a tab-delimited table format. given this data:
(company
(dept
(name "special-operations")
(person
(name "james-bond"))
(person
(name "fred"))))
the above command will return a two column table
special-operations james-bond
special-operations fred
If there are multiple values for the columns within the node, then the cartesian product will be calculated
USAGE
stag-flatten [-p PARSER] [-c COLS] [-c COLS] NODE <file>
ARGUMENTS
-p|parser FORMAT
FORMAT is one of xml, sxpr or itext
xml assumed as default
-c|column COL1,COL2,COL3,..
the name of the columns/elements to write out
this can be specified either with multiple -c arguments, or with a comma-seperated (no spaces) list of column (terminal node) names
after a single -c
-n|nest
if set, then the output will be a compress repeating values into the same row; each cell in the table will be enclosed by {}, and will
contain a comma-delimited set of values
SEE ALSO
Data::Stag
perl v5.10.0 2008-12-23 STAG-FLATTEN(1p)