03-18-2015
thanks zaxxon & rudic, both works.
nope, sure not a homework for me at least. i am new to awk and i feel i really need to sit down and learn the basics. thanks again.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need help in file comparision.
I have two files in below format:
FILE_A:
-------
COL1 COL2 COL3 COL4 COL5
FILE_B:
-------
COL1A COL1B COL1C COL1D COL1E
i want to compare for a for each row in FILE_A and FILE_B
COL1 of FILE_A with COL1B of FILE_B
COL3 of FILE_A with COL1E of... (1 Reply)
Discussion started by: learnoutmore99
1 Replies
2. Shell Programming and Scripting
Hi Guys. I have tried the commands sort and join. But I couldn't able to to find the command for joining in a single line based on keys.My example inputs and outputs are like the following.
Help would be appreciated.:D
Input file
a1tabXXXXXXX
a2tabXXXXXXX
a6tabYYYYYYYYY
a71tabXXXXXXX... (7 Replies)
Discussion started by: repinementer
7 Replies
3. Shell Programming and Scripting
Hi,
I am new to unix and would greatly appreciate some help.
I have a file containing multiple colums containing different sets of data e.g.
File 1:
John Ireland 27_December_69
Mary England 13_March_55
Mike France 02_June_80
I am currently using the awk... (10 Replies)
Discussion started by: crunchie
10 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
i have a excel sheet with two columns as below.
column1 column2
100 100
200 300
300 400
400 400
500 600
i need to compare the values these two columns and the output should be printed in the third column...if these values are equal the output should be green and if these... (2 Replies)
Discussion started by: arunmanas
2 Replies
5. Shell Programming and Scripting
Dear everyone,
I need any sort of shell script or perl script would do the following. I have a txt file as follows:
;Stretnumber Resident Resdient (not in file)
16 John Mary
16 Mary Parker
16 Nancy Smith
16 Mary John
18 Trey ... (5 Replies)
Discussion started by: sasharma
5 Replies
6. Shell Programming and Scripting
Hi,
I have a large file with 100,000+ lines. Each line have a single value.
How do I effiecntly format the text to be X number of commas spaced fields in width.
i.e how do i turn this input:
26
53
79
80
81
82
111
131
135
139
192
193
198
199
203
209 (2 Replies)
Discussion started by: carlr
2 Replies
7. Shell Programming and Scripting
Hi friends
please help me on below,
i have 5 files like below
file1 is
x 10
y 20
z 15
file2 is
x 100
z 245
file3 is
y 78
z 23
file4 is
x 100 (3 Replies)
Discussion started by: siva kumar
3 Replies
8. Shell Programming and Scripting
Hi,
I have 3 files with one column value as shown
File: a.txt
------------
Data_a1
Data_a2
File2: b.txt
------------
Data_b1
Data_b2
Data_b3
Data_b4
File3: c.txt
------------
Data_c1
Data_c2
Data_c3
Data_c4
Data_c5 (6 Replies)
Discussion started by: vfrg
6 Replies
9. Shell Programming and Scripting
Hello guys, I am quite new to Shell Scripting and I need help for this
I have a CSV file like this:
Requisition,Order,RequisitionLineNumber,OrderLineNumber
REQ1,Order1,1,1
REQ1,Order1,1,3
REQ2,Order2,1,5
Basically what I want to do is compare the first 3 fields
If all 3 fields are the same... (5 Replies)
Discussion started by: jeffreybsu
5 Replies
10. Shell Programming and Scripting
Hi All,
Need to compare two date columns from the filname FinalDate.txt. My data's are like below
D_OT_START D_EXP_STR Amount
1/3/2012 1/3/2012 5000
6/21/2011 6/25/2011 6000
2/28/2011 2/28/2011 7000
7/16/2010 8/16/2010 8000
7/14/2010 10/26/2010 9000
... (3 Replies)
Discussion started by: suresh_target
3 Replies
fspec(4) File Formats fspec(4)
NAME
fspec - format specification in text files
DESCRIPTION
It is sometimes convenient to maintain text files on the system with non-standard tabs, (tabs that are not set at every eighth column).
Such files must generally be converted to a standard format, frequently by replacing all tabs with the appropriate number of spaces, before
they can be processed by system commands. A format specification occurring in the first line of a text file specifies how tabs are to be
expanded in the remainder of the file.
A format specification consists of a sequence of parameters separated by blanks and surrounded by the brackets <: and :>. Each parameter
consists of a keyletter, possibly followed immediately by a value. The following parameters are recognized:
ttabs The t parameter specifies the tab settings for the file. The value of tabs must be one of the following:
o A list of column numbers separated by commas, indicating tabs set at the specified columns.
o A '-' followed immediately by an integer n, indicating tabs at intervals of n columns.
o A '-' followed by the name of a ``canned'' tab specification.
Standard tabs are specified by t-8, or equivalently, t1,9,17,25, etc. The canned tabs that are recognized are defined by
the tabs(1) command.
ssize The s parameter specifies a maximum line size. The value of size must be an integer. Size checking is performed after tabs
have been expanded, but before the margin is prepended.
mmargin The m parameter specifies a number of spaces to be prepended to each line. The value of margin must be an integer.
d The d parameter takes no value. Its presence indicates that the line containing the format specification is to be deleted
from the converted file.
e The e parameter takes no value. Its presence indicates that the current format is to prevail only until another format
specification is encountered in the file.
Default values, which are assumed for parameters not supplied, are t-8 and m0. If the s parameter is not specified, no size checking is
performed. If the first line of a file does not contain a format specification, the above defaults are assumed for the entire file. The
following is an example of a line containing a format specification:
* <:t5,10,15 s72:> *
If a format specification can be disguised as a comment, it is not necessary to code the d parameter.
SEE ALSO
ed(1), newform(1), tabs(1)
SunOS 5.10 3 Jul 1990 fspec(4)