This shoudl doe what you ask. From your existing code, the requirement is more complex than what you've asked for her, so I'll explain how this works so you can apply to what you have.
Firstly the above code reads all three files in 1 call to awk.
BEGIN executes before the 3 files are read and END after all three.
FNR is the row number in the individual file (NR is the total rows read so far).
printf allows strings withouta <CR> to be output.
SHELL SCRIPT
Hi,
I have 3 separate files within a folder. Every File contains data in a single column like
File1 contains data
mayank
sushant
dheeraj
File2 contains
DSA_AT
MG_AT
FLAT_09
File3 contains data
123123
232323 (2 Replies)
Hi everybody (first time posting here)
I have a file1 that looks like >
1,101,0.1,0.1
1,26,0.1,0.1
1,3,0.1,0.1
1,97,0.5,0.5
1,98,8.1,0.218919
1,99,6.2,0.248
2,101,0.1,0.1
2,24,3.1,0.147619
2,25,23.5,0.559524
2,26,34,0.723404with 762 lines..
I have another 'similar' file2 >
... (10 Replies)
Hello,
:wall:
I have a 12 column csv file. I wish to delete the entire line if column 7 = hello and column 12 = goodbye. I have tried everything that I can find in all of my ref books.
I know this does not work
/^*,*,*,*,*,*,"hello",*,*,*,*,"goodbye"/d
Any ideas?
Thanks
Please... (2 Replies)
Hi All,
Am trying script to compare 2 files and print the difference found from old file to new file on line by line basis on side by side display.
Basically line by line comparision and files may contain blank line as well
I know we have compare/diff commands but i don't how to make... (10 Replies)
I am new to awk scripting.
I want to do a field by word (field) comparison of two files File1.txt and File2.txt.
The files contain a list of | (pipe) separated field.
**File 1:
-------------------
aaa|bbb|ccc|eee|fff
lll|mmm|nnn|ooo|ppp
rrr|sss|ttt|uuu|vvv**
File 2: ... (7 Replies)
Hi,
i have a scenario were i should compare a few fields from each line then increment a variable based on that.
Example file
989878|8999|Y|0|Y|N|V
989878|8999|Y|0|N|N|V
989878|8999|Y|2344|Y|N|V
i have 3 conditions to check and increment a variable on every line
condition 1 if ( $3... (4 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
I am trying to use awk to find all the $3 values in file2 that are between $2 and $3 in file1. If a value in $3 of file2 is between the file1 fields then it is printed along with the $6 value in file1. Both file1 and file2 are tab-delimited as well as the desired output. If there is nothing to... (4 Replies)
Hi,
Below are the sample files. x.txt is from an Excel file that is a list of users from Windows and y.txt is a list of database account.
$ head -500 x.txt y.txt
==> x.txt <==
TEST01 APP_USER_PROFILE
USER03 APP_USER_PROFILE
TEST02 APP_USER_EXP_PROFILE
TEST04 APP_USER_PROFILE
USER01 ... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT DEBIAN
geo::coordinates::itm
Geo::Coordinates::ITM(3pm) User Contributed Perl Documentation Geo::Coordinates::ITM(3pm)NAME
Geo::Coordinates::ITM - Convert coordinates between lat/lon and Irish Transverse Mercator
VERSION
This document describes Geo::Coordinates::ITM version 0.02
SYNOPSIS
use Geo::Coordinates::ITM qw( ll_to_grid grid_to_ll );
my ( $lat, $lon ) = grid_to_ll( $east, $north );
my ( $east, $north ) = ll_to_grid( $lat, $lon );
DESCRIPTION
Convert back and forth between Irish Transverse Mercator grid and WGS84. The conversion code was stolen wholesale from
<http://bit.ly/ZqpUA>.
http://svn.geograph.org.uk/svn/branches/british-isles/libs/geograph
/conversionslatlong.class.php
Nothing is exported by default. The exportable functions are "ll_to_grid" and "grid_to_ll".
INTERFACE
"ll_to_grid"
Convert a latitude, longitude (WGS84) coordinate pair into an ITM easting and northing.
my ( $east, $north ) = ll_to_grid( $lat, $lon );
"grid_to_ll"
Convert an ITM easting, northing pair to a WGS84 latitude, longitude.
my ( $lat, $lon ) = grid_to_ll( $east, $north );
BUGS
Please report any bugs or feature requests to "bug-geo-coordinates-itm@rt.cpan.org", or through the web interface at <http://rt.cpan.org>.
AUTHOR
Andy Armstrong "<andy@hexten.net>"
Code gratefully stolen from <http://bit.ly/ZqpUA>
http://svn.geograph.org.uk/svn/branches/british-isles/libs/geograph
/conversionslatlong.class.php
LICENCE AND COPYRIGHT
Copyright (c) 2009, Andy Armstrong "<andy@hexten.net>".
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
perl v5.14.2 2012-03-31 Geo::Coordinates::ITM(3pm)