12-31-2012
Quote:
In the file with both entries, if the truncated and rounded entries are the same, do you want that entry printed twice, or just once? (For example, 5310.000 truncates to the 53rd entry and rounds to the 53rd entry.)
They can be printed once.
Quote:
What names do you want for these four files?
File names can be no.txt, trun.txt, round.txt, tro.txt
Quote:
In the file that has both rounded and truncated entries, do you want any kind of marker added to the output entries indicating that there are two output record for a single input line? If so, what should the marker be?
In the file with truncated and rounded entries, do you want any kind of marker added to the output entries indicating that the record from 11.txt was selected based on truncating a value or rounding a value, respectively? If so, what should the markers be?
In the file with nothing for values that are not evenly divisible by 100, do you want any kind of marker in the output to show that an entry was skipped? If so, what should the markers be?
Do you want one of these four files to be written to standard output, or do you want all output to be written directly to the four files?
If you want markers, it would be relatively easy to include markers of the form:
Yes, I wish to have markers. All output should be directly written to four files.
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: narasimhulu
2 Replies
2. Shell Programming and Scripting
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)
Discussion started by: ahjiefreak
7 Replies
3. Shell Programming and Scripting
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)
Discussion started by: a-gopal
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: garethsays
3 Replies
5. UNIX for Dummies Questions & Answers
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)
Discussion started by: Fahmida
8 Replies
6. Shell Programming and Scripting
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)
Discussion started by: chrisjorg
3 Replies
7. UNIX for Dummies Questions & Answers
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)
Discussion started by: bioinfo
0 Replies
8. Shell Programming and Scripting
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)
Discussion started by: bioinfo
11 Replies
9. Shell Programming and Scripting
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)
Discussion started by: oahmad
2 Replies
10. UNIX for Dummies Questions & Answers
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 MOJAVE
replmarks
REPLMARKS(1) General Commands Manual REPLMARKS(1)
NAME
replmarks - replace triangular markers in a RADIANCE scene description
SYNOPSIS
replmarks [ -e ][ -m newmod ][ -s scale ] { -x objfile | -i octree | -I mesh } modname .. [ file .. ]
DESCRIPTION
Replmarks replaces triangular markers identified by the modifier modname in each scene description file and writes the result to the stan-
dard output. The -x option indicates that each marker should be replaced by an appropriate xform(1) command on objfile. The -i option
indicates that each marker should be replaced by an instance of octree. The -I option indicates that each marker should be replaced by an
instance of the Radiance mesh mesh. One of these three options must appear on the command line, along with modname, the modifier used by
markers in the file.
Multiple modifiers may be given, as long as each one is preceded by its own -x or -i option.
The transformation for each marker is determined by its location and orientation. A marker should be a right triangle pointing like a
half-arrow in the direction of the transformed x-axis, x'. The longest side is the hypoteneuse, the second longest side is the x'-axis,
and the third longest side indicates the direction of the y'-axis. Any additional sides will be ignored (ie. a quadrilateral may be used
instead of a triangle if the extra side is small). The z'-axis is determined by the cross product of the x' and y' axes, and the origin is
the common vertex between x' and y'.
The size of the marker is ignored unless the -s option is used, where scale is a multiplier for the x'-axis length to indicate the total
scale factor. For example, a scale value of 5 with a marker length of .5 would result in a total scale factor of 2.5 to be used in the
transformation.
The -e option causes commands in the file to be expanded, and is required to replace markers from commands in the input file. Even with
this option, replmarks will not examine objects for markers. Specifically, an object included by replmarks as a result of a -x expansion
will be transferred verbatim, without regard to any surfaces therein that might have been considered as marks if they were on the main
input.
The -m option causes all replaced objects to be given the modifier newmod. Otherwise, the new object surfaces will use their originally
defined modifiers. A different replacement modifier may be given for each marker type. The marker modifier name itself is only used to
identify markers, and will not appear in the output in any form.
If no input file is given, the standard input is read.
EXAMPLE
To replace all polygons with the modifier ``knobs'' in the file input with a transformed ``knob.rad'' and write the result to output:
replmarks -x knob.rad knobs input > output
To use instances of ``tree.oct'' with scaling set to three times the tree marker length:
replmarks -s 3 -i tree.oct tree input > output
AUTHOR
Greg Ward
SEE ALSO
arch2rad(1), ies2rad(1), xform(1)
RADIANCE 3/24/94 REPLMARKS(1)