Just realized my mistake, the column names above were NOT correctly aligned above, so this script (which is awesome) doesn't work.
The columns of the input data should have read:
This was totally my fault, could anyone help me fix the script now?
Just change the $X to the correct columns, but since I don't completely understand the date parse, I am not sure which column they should use.
Last edited by boolean2222; 08-16-2009 at 12:21 AM..
Hi, I have used the following code to sort two sets of data:
awk '{printf "%10s %s\n",$1,$2}'
The first column is text and the second involves numbers. I was just wondering how i would go about sorting the second number so that they ascend from the top?
Thanks for any help (4 Replies)
The line is simple, use " '{ print $1"]"$2"\"$3THE " NEEDS TO GO HERE$4 }'
I've tried \", "\, ^" and '"" but none of it works. What am I missing? Putting in the [ between $1 and $2 works fine, I just need to do the same with a ".
Thanks. (2 Replies)
i have following file have following type of data
1~%%~fcashfafh~%%~9797
can i sort(numeric) the file on first field and then on last feild using awk (3 Replies)
Hi,
I have a file which is:-
1 6 4 8 2 3
2 1 9 3 2 1
3 3 5 6 3 1
4 9 7 8 2 3
I would like to sort from field $2 to field $6 for each of the line to:-
1 2 3 4 6 8
2 1 1 2 3 9
3 1 3 3 5 6
4 2 3 7 8 9
I came across this Arrays on example 26-6. But it is much complicated. I am... (7 Replies)
I need to sort this input using sed, awk or any other tool to give below output
Input:
RXOCF-8
CLASS 2A
57
RU
40
RXORX-8-0
CLASS 1B
23 45 16
RXORX-8-1
EXTERNAL CLASS 2A (12 Replies)
I have an array with five columns and i want to write it to a file.
Before writing it i must sort it using the field in the fifth column.
_________________________________________
|field 1|field 2|field 3|field 4|field 5|
| | | | | |
| | | |... (6 Replies)
hi everyone, I am kind of new to this forum. I need help in sorting this data out accordingly, I am actually doing a traceroute application and wants my AS path displayed in front of my address like this;
192.168.1.1 AS28513 AS65534 AS5089 AS5089 .... till the last AS number and if possible sort... (8 Replies)
Hello all, I am new here and *relatively* new to Unix. I have a bit of an emergency. I have a three column file that I need to sort:
sample name, miRNA, reads per million (RPM)
There are multiple samples, and for each sample name there are multiple miRNAs and associated RPMs. Some of these... (6 Replies)
Hello,
I have a file which has the following format: I have to do is sort individual records in the file based on the 4th field. Each record starts with "Module". Is there an easy way to do this using awk. I have tried piping output from awk to sort and also using "sort" inside awk but... (8 Replies)
Hello,
I have a file as follows:
BTA Pos KLD
4 79.7011 5.7711028907
4 79.6231 5.7083918219
5 20.9112 4.5559494707
5 58.0002 3.4423546273
6 38.2569 4.7108176788
6 18.3889 7.3631759258 (1 Reply)
Discussion started by: Homa
1 Replies
LEARN ABOUT REDHAT
tzselect
TZSELECT(8) System Manager's Manual TZSELECT(8)NAME
tzselect - select a time zone
SYNOPSIS
tzselect
DESCRIPTION
The tzselect program asks the user for information about the current location, and outputs the resulting time zone description to standard
output. The output is suitable as a value for the TZ environment variable.
All interaction with the user is done via standard input and standard error.
ENVIRONMENT VARIABLES
AWK Name of a Posix-compliant awk program (default: awk).
TZDIR Name of the directory containing time zone data files (default: /usr/local/etc/zoneinfo).
FILES
TZDIR/iso3166.tab
Table of ISO 3166 2-letter country codes and country names.
TZDIR/zone.tab
Table of country codes, latitude and longitude, TZ values, and descriptive comments.
TZDIR/TZ
Time zone data file for time zone TZ.
EXIT STATUS
The exit status is zero if a time zone was successfully obtained from the user, nonzero otherwise.
SEE ALSO newctime(3), tzfile(5), zdump(8), zic(8)TZSELECT(8)