Sponsored Content
Top Forums Shell Programming and Scripting AWK processing -numbers to another column Post 302364050 by BeJay on Thursday 22nd of October 2009 01:26:25 AM
Old 10-22-2009
That is perfect Scrutinizer Smilie

I didn't know you could use if/then statements in AWK, so that makes it much easier to understand. I've been bashing my head for quite a while Smilie

Thanks again!

Bj
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

processing matrix column wise

I have a m X n matrix written out to file, say like this: 1,2,3,4,5,6 2,6,3,10,34,67 1,45,6,7,8,8 I want to calculate the column averages in the MINIMUM amount of code or processing possible. I would have liked to use my favorite tool, "AWK" but since it processes rowwise, getting the... (5 Replies)
Discussion started by: Abhishek Ghose
5 Replies

2. UNIX for Dummies Questions & Answers

Increasing numbers in Column

I have UWIn version of Unix for Desktop. I have a file (Subtitle file of a movie) with the following format abc def ghi jkl mno pqr stuv uvw xyz The subtitles are delayed about a min or few seconds more. I want to increase it to be as shown below: abc def ghi jkl mno pqr stuv ... (4 Replies)
Discussion started by: bobbygsk
4 Replies

3. Shell Programming and Scripting

trying to make an AWK code for ordering numbers in a column from least to highest

Hi all, I have a large column of numbers like 5.6789 2.4578 9.4678 13.5673 1.6589 ..... I am trying to make an awk code so that awk can easily go through the column and arrange the numbers from least to highest like 1.6589 2.4578 5.6789 ....... can anybody suggest, how can I do... (5 Replies)
Discussion started by: ananyob
5 Replies

4. Shell Programming and Scripting

Processing text variables that have numbers in CShell

Hello, I have a case where I need to process an environment variable text value in CShell to calculate the product of 2 numbers stated in the variable string having the format "<first_number>Letter x<second_number>". Ex: $VAR = "24x20" I need to set $VAR_PRODUCT = "Product of 20 and 24"... (3 Replies)
Discussion started by: mohy
3 Replies

5. Programming

AWK processing of a three-column file

I have a 3-column data file, for which I wish to print certain parts of $3 PHI PSI A(x) -177.5 -177.5 1.0625 -177.5 -172.5 0.55 -177.5 -167.5 0.0478125 -177.5 -162.5 0 -177.5 -157.5 0.284375 -177.5 -152.5 0.187188 -177.5 -147.5 0.236875 -177.5 -142.5 0.383438 -177.5 ... (3 Replies)
Discussion started by: chrisjorg
3 Replies

6. Shell Programming and Scripting

Help with File processing - Extracting the column

I have a line from table space report: 5 135_TT ms Normal 1774336.0 1774208.0 761152.0 1013056.0 57.1% Now I have to get 1013056.0 as o/p. For this I tried cut -f32 -d" " previously it worked now it is showing empty space. Suggest me the best code for this which... (1 Reply)
Discussion started by: karumudi7
1 Replies

7. Shell Programming and Scripting

AWK "make a new column that include increasing numbers"

please help!!!!!! I have a file .txt that has only one column like that: 34.1 35.5 35.6 45.6 ... Now, i want to add a column in the left in which the values of this column increase by 0.4 , for example: 0.0 34.1 0.4 35.5 0.8 35.6 1.2 45.6 How can i do with awk instructions??? ... (2 Replies)
Discussion started by: tienete
2 Replies

8. Programming

awk processing / Shell Script Processing to remove columns text file

Hello, I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this : This is the output of ls command : I stored the output in a file filelist 1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies

9. Shell Programming and Scripting

Help with awk script to get missing numbers in column 1

Hello to all, I have show below a file separated by commas. In first column has numbers where the last number is 13. 1,4 2,6 3,7 5,2 6,5 7,5 8,65 9,10 11,78 13,2 What I want to know is which numbers are missing from 1 to 13 (in this case 13 is last number in column 1). My real... (17 Replies)
Discussion started by: Ophiuchus
17 Replies

10. Shell Programming and Scripting

Use awk to replace numbers in a file with a column from another file

Hello, I am trying to make a awk code that will take 2 files, a txt file like this : 1 1 88 c(1:38, 42, 102) 2 2 128 c(39:41, 43:101, 103:105, 153, 155:189, 292, 344:369) 3 3 84 c(190:249, 603, 606:607, 609:629) 4 4 12 ... (8 Replies)
Discussion started by: nastaziales
8 Replies
IGAWK(1)							 Utility Commands							  IGAWK(1)

NAME
igawk - gawk with include files SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ... igawk [ all gawk options ] [ -- ] program-text file ... DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1). AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like @include getopt.awk in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path. OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports. EXAMPLES
cat << EOF > test.awk @include getopt.awk BEGIN { while (getopt(ARGC, ARGV, "am:q") != -1) ... } EOF igawk -f test.awk SEE ALSO
gawk(1) Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995. AUTHOR
Arnold Robbins (arnold@skeeve.com). Free Software Foundation Nov 3 1999 IGAWK(1)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy