Hi guys,
I am doing an exercise we got in school and I am stucked at the point when I think everything is correct, but obviously is not :-).
Target: Make a very simple pascal program, which opens a text file with three variables(name, sex, salary) and returns the highest women salary.
I have the following:
Program salaries;
uses crt;
I have a flat file with 2 columns
Code:
Id,loc
1,nj:ny:pa
2,pa
3,ca:tx:fl:nj
Second colum data is seperated by semi colon and can i have many locations for one id
Output i need is
Code:
1,nj
1,ny
1,pa
1,pa
3,ca
3,tx
3,fl
3,nj
I need to split the record in to multiple records.
please help me how to proceed
Moderator's Comments:
i have following pattern in file
Code:
s6:s2
s2:s4
s1:s2:s3:s4:s5:s6
s1
.
.
Now i want to find occurence of each record in file like s6:s2 occurs twice {once in first record and both occur in 3 record as well}
so output should be
Code:
s6:s2 2
s2:s4 2
s1:s2:s3:s4:s5:s6 :1
s1 : 2
..
Hi all,
For no particular reason, I would like to use awk on a file that contains multiple columns, but let's say only columns 1 and 2 have some text values, and the remainder of the line contains text that I would like to treat as one column, considering I have spaces as delimiter for the columns, e.g.:
Code:
alpha 200 this is a comment for this record
bravo 400 this is another comment for
Hi,
I have a data file where data is splitted into multiple lines.
Hi,
I'm new to unix, i have a variable length file like below,
Code:
01|Test|Test1|Sample|
02|AA|BB|CC|DD|
03|AAA|BBB|CCC|DDD|EEE|RRR|TTT|SSS|YYY|
I need to make this as a fixed length file. Assume that i have 10 columns in the DAT file.
for ex: the first 01 record is having 4cols - there i need to add six "|" delimiter and for 02 record need to add five delimiters.
Hi
My file have 7 column, FIle is pipe delimed
Code:
Col1|Col2|col3|Col4|col5|Col6|Col7
I want to find out uniq record count on col3, col4 and col2 ( same order) how can I achieve it.
ex
Code:
1|3|A|V|C|1|1
1|3|A|V|C|1|1
1|4|A|V|C|1|1
Output should be
Code:
FREQ|A|V|3|2
FREQ|A|V|4|1
Here last column is count.
Moderator's Comments:
Hi,
If you suppose that you have two columns of numbers, and I want to merge these two columns into one and put a bracket around it.
Hi All,
I am new to unix but have a requirement wherein I need to separate datatype,length, and column name from input file which is of below format --
record
integer(10) empid;
string(25) name;
date("YYYY-MM-DD") dob;
decimal(10) salary;
end
now after getting datatype,its length and column name. I need to put them in some other file(which has standard format) on specific locations.