02-09-2012
Can you post desired output for those two input files?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i have 2 files like f1 and f2
f1:
1
Note: some times it will be cahnged to 2 and 3.
f2:
1:20
2:30
4:50
6:70
8:90
3:20
1:30
1:40
output:
1:80
(sum of 1) (6 Replies)
Discussion started by: koti_rama
6 Replies
2. Shell Programming and Scripting
I'm reading 2 input files but not getting expected value.
I should get an alpha value on file_1_data but not getting any.
Please help.
>cat test6.sh
awk '
FILENAME==ARGV { file_1_data=$0; print "----- 1 Line " NR " -----" $1; next }
FILENAME==ARGV { file_2_data=$0; print "----- 2... (1 Reply)
Discussion started by: pdtak
1 Replies
3. Shell Programming and Scripting
Hi,
I needs to split *.txt files from single directory depends on the some mutltiple input values. i have wrote the code like below
for file in *.txt
do
grep -i -h "value1|value2" $file > $file;
done.
My requirment is more input values needs to be given in grep; let us say 50... (3 Replies)
Discussion started by: arund_01
3 Replies
4. Shell Programming and Scripting
hi,
i'm a beginner in writing awk scripts and I have a problem with reading input files.
Requirement for my programm:
compare file1 to file2 and check if value in column1 is equal and value in column5 is different.
File 1:
180 P 01.01.2008 30.06.2008 2
180 P 01.07.2008 ... (10 Replies)
Discussion started by: tgooper
10 Replies
5. Shell Programming and Scripting
Compare 2 files and print the values input1 (c1 20 100 X_y10) along with one closest highest (c1 100 200 X_y10) and one lowest values (c1 10 15 X_y10) from input2
input1
c1 20 100 X_y10
input2
c1 5 10 X_y10
c1 10 15 X_y10
c1 100 200 X_y10
c1 200 300 X_y10
output
... (8 Replies)
Discussion started by: bumblebee_2010
8 Replies
6. Shell Programming and Scripting
Hi ,
i have two input files one is input.gz and another is ( input.txt) text file.in gz format input file each record contains 10 fields and corresponding header value is present in the text file as a single record i.e text file contains only 10 records which is header value,so output of the awk... (1 Reply)
Discussion started by: Ajoy
1 Replies
7. Shell Programming and Scripting
Hello,
I'm trying to write an awk program that reads two files inputs.
example,
file 1:
0.00017835
0.000176738
0.00018811
0.000189504
0.000188155
0.000180065
0.000178991
0.000178252
0.000182513
file 2:
1.7871769E-05 1.5139576E-16 1.5140196E-16 1.5139874E-16
1.7827407E-04 ... (5 Replies)
Discussion started by: joseamck
5 Replies
8. UNIX for Dummies Questions & Answers
I write this bit of code to calculate the mean and variance for all the files in one directory and print the mean and variance in a separate folder but with the same file name.
FILES="data/*"
for X in $FILES
do
name=$(basename $X)
awk '{x=$0; s+=$0; n++}
END{mean=s/n; for (i in x){ss... (20 Replies)
Discussion started by: A-V
20 Replies
9. Shell Programming and Scripting
I have two files that I am going to use diff to find the differences but need to parse them before I do that. I have include the format of each file1 and file2 with the desired output of each (the first 5 fields in each file). The first file has a "chr" before the # that needs to be removed. I... (1 Reply)
Discussion started by: cmccabe
1 Replies
10. Shell Programming and Scripting
Greetings all,
I have came up with some code, to read an input file and generate a list, here is a sample of what I am working with. The variable $USER will be inputted by the person running the utility.
do
folder=${line%}
echo "$folder $USER
done < list.txt
sample of list.txt-
... (15 Replies)
Discussion started by: jeffs42885
15 Replies
LEARN ABOUT DEBIAN
meta2tga
META2TGA(1) General Commands Manual META2TGA(1)
NAME
meta2tga - convert metafile to Targa image format
SYNOPSIS
meta2tga [ -c | -r ][ -x width ][ -y height ][ -m minrad ][ -o outname ] file ..
DESCRIPTION
Meta2tga reads each metafile file in sequence and converts it to a compressed, color-mapped Targa file. The result is sent to the standard
output (which must be redirected) unless the -o option is used. The argument to the -o option specifies the base file name, to which a
page number and ".tga" is added as a suffix. Note that this option must be present in order to produce more than a single page of output.
The default output resolution is 400 by 400, but a different resolution can be given with the -x and -y options.
The -m option can be used to set a minimum value for the line radius in pixels. This may be helpful for improving the readability of high
resolution output. The default value is 0, which allows lines of one pixel thickness.
If the option -c is specified, the input files are only conditioned for output, ie. expanded (see pexpand). This is useful if many copies
of the same output is desired. If the option -r is instead specified, the input is assumed already to be conditioned. If no input files
are specified, the standard input is read.
EXAMPLE
To convert the plots examp1.plt and examp2.plt to 1024x1024 Targa files:
bgraph examp1.plt examp2.plt | meta2tga -o examp -x 1024 -y 1024
FILES
see pexpand(1) and psort(1)
AUTHOR
Greg Ward
SEE ALSO
bgraph(1), igraph(1), meta2bmp(1), pexpand(1), psmeta(1), psort(1), ra_t8(1)
RADIANCE
6/24/98 META2TGA(1)