Hi, I am also a newbie in awk and trying to find solution of my problem.
I have one reference file 1.txt with 2 columns and I want to search other 10 files (a.txt, b.txt......h.txt each with 5 columns) corresponding to the values of 2nd column from 1.txt. If the value from 2nd column from 1.txt matches with the value of 4th column of 10 files, then print the row as well as file name.
Also, in 1.txt for eg. 1st value is -191.632 but originally in a.txt it is -191.6318, so I also want to print values same upto two decimal places and rest places can be any number.
I'm not sure if you want the values in 1.txt column 2 and a-h.txt column 4 truncated to two decimal places or rounded to two decimal places (with your sample input, the results are the same) and I'm not sure why DGPickett thinks join and sort would be easier than awk, but here are ways to use awk to do what I think you're requesting...
This User Gave Thanks to Don Cragun For This Post:
Hello,
I have a file.txt with 20000 lines and 2 columns each which consists of current_filename and new_filename . I want to create a script to find files in a directory with current_filename and move it to new folder with new_filename.
Could you please help me how to do that??
... (2 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)
Hi,
I'm trying to read a file containing lines with spaces in them.
The inputfile looks like this
------------------------------
Command1 arg1 arg2
Command2 arg5 arg6 arg7
-------------------------------
The shell code looks like this...
lines=`awk '{ print }' inputfile`
... (2 Replies)
I'm trying to reformat some tide information into a useable format and failing.
Input file is....
4452 CHENNAI (MADRAS)
13°06'N, 80°18'E India East Coast 01 June 2009 UT(GMT)
Data Area 3. Indian Ocean (northern part) and Red Sea to Singapore
01/06/2009
00:00 0.7 m
00:20 0.7 m
00:40... (3 Replies)
Hi Everyone,
I have an input file in the following format:
score.file1.txt
contig00045 length=566 numreads=19 1047 0.0
contig00055 length=524 numreads=7 793 0.0
contig00052 length=535 numreads=10 607 e-176
contig00072 length=472 numreads=46 571 e-165... (8 Replies)
I would like to write a script to extend this command to a general case:
BEGIN {s_0=0;n_0=0}{n_0++;s_0+=($51-$1)^2}END {print sqrt(s_0/n_0)}
i.e. so that
BEGIN {s_0=0;n_0=0}{n_0++;s_0+=($51-$1)^2}END {print sqrt(s_0/n_0)}
BEGIN {s_1=0;n_1=0}{n_1++;s_1+=($51-$2)^2}END {print... (3 Replies)
Hi, I am also a newbie in awk and trying to find solution of my problem.
I have one reference file 1.txt with 2 columns and I want to search other 10 files (a.txt, b.txt......h.txt each with 5 columns) corresponding to the values of 2nd column from 1.txt. If the value from 2nd column from 1.txt... (0 Replies)
Hi, I have two files: atom.txt and g.txt
atom.txt has multiple patterns but I am showing only two patterns each ending with ENDMDL:
ATOM 1 N SER A 1 35.092 83.194 140.076 1.00 0.00 N
ATOM 2 CA SER A 1 35.216 83.725 138.725 1.00 0.00 C
TER
ENDMDL
ATOM 1 N SER A 1 35.683 81.326 139.778 1.00... (11 Replies)
Hi
I am a newbie starting bash and I have a simple need to return the result of an operation from awk to bash. basically I want to use awk to tell me if "#" exists in a string, and then back in bash, i want to do an IF statement on this return in order to do other things. In my bash shell I... (2 Replies)
Hi!
I have a new problem with awk, this time I think is because I'm using it in bash and I don't know how to put the valor of the variable in awk. Here is the code:
#!/bin/bash
for i in 1 2 3 4 5
do
a=$i
b=$
awk '$1>=a&&$1<=b {print $1,$2,$3}'>asdf test... (3 Replies)
Discussion started by: florpi
3 Replies
LEARN ABOUT DEBIAN
ecaccess-file-move
ECACCESS-FILE-MOVE(1p) User Contributed Perl Documentation ECACCESS-FILE-MOVE(1p)NAME
ecaccess-file-move - Move or Rename ECaccess Files
SYNOPSIS
ecaccess-file-move -version|-help|-manual
ecaccess-file-move [-debug] source-ecaccess-file target-ecaccess-file
DESCRIPTION
Allow moving an ECaccess File. When the move occurs within the same ECaccess File System then it is a rename. When the move occurs across
two different ECaccess File Systems then first a copy is done and then a delete of the original file is done (e.g. similar to ecaccess-
file-copy ... -erase).
The source-ecaccess-file and target-ecaccess-file are in the form [domain:][/user-id/]path. Please read the "Shell commands -> File
Management" section of the "ecaccess" guide for more information on the ECaccess File System.
ARGUMENTS
source-ecaccess-file
The source ECaccess File name.
target-ecaccess-file
The target ECaccess File name.
OPTIONS -version
Display version number and exits.
-help Print a brief help message and exits.
-manual Prints the manual page and exits.
-debug Display the SOAP messages exchanged.
EXAMPLES
ecaccess-file-move ec:test1.txt ec:test2.txt
Rename the test1.txt file in the ECFS directory of the authenticated user in test2.txt.
ecaccess-file-move ec:test1.txt home:test2.txt
Copy the test1.txt file from the ECFS directory of the authenticated user to the test2.txt file in the $HOME directory of the authenticated
user, then delete the test1.txt file from ECFS.
SEE ALSO
ecaccess-file-delete, ecaccess-file-get, ecaccess-file-mget, ecaccess-file-modtime, ecaccess-file-mput, ecaccess-file-rmdir, ecaccess-file-
copy, ecaccess-file-dir, ecaccess-file-mdelete, ecaccess-file-mkdir, ecaccess-file-chmod, ecaccess-file-put, ecaccess-file-size and
ecaccess.
perl v5.14.2 2012-04-16 ECACCESS-FILE-MOVE(1p)