01-31-2012
What is the desired output for those two files?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to read $3,$4,$5,$6,$7 of fileA in array and when
fileb $1 = fileA $4
the i want to print array and few fields from fileB.
This should work but has some syntax error.
nawk -F, 'FNR==NR{a=;next} a{print a}' fileB fileA
Appreciate if someone can correct this. (2 Replies)
Discussion started by: pinnacle
2 Replies
2. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies
3. Shell Programming and Scripting
Hi Everyone,
This is just my method to if want fields in a file into each array.
# cat /tmp/3.txt
00:00:01 1
00:00:02 2
00:00:03 33
# cat text.pl
#!/usr/bin/perl
@field1 = `cat '/tmp/3.txt' | cut -f1 -d'\t'`;
print $field1;
# ./text.pl
00:00:01
#
As we can... (4 Replies)
Discussion started by: jimmy_y
4 Replies
4. Shell Programming and Scripting
consider this is a line A#B#C#D#E#F#G#H
note the delimeter is #
i want to cut or spilt in to fields using the delimeter # and to store in an array.
like this
array=A
array=B
array=C
array=D
array=E
and the array content should be displayed.
echo "${array}"
echo "${array}"... (5 Replies)
Discussion started by: barani75
5 Replies
5. UNIX for Dummies Questions & Answers
Hi experts,
I have been trying for a while to accomplish the following task using awk, and I just don't seem find find a way. I am not particular about using awk, it just seemed like the logical choice at first.
I have a file that contains 5 fields that are delimited by a space character.... (1 Reply)
Discussion started by: GermanicGalore
1 Replies
6. Shell Programming and Scripting
Hi All,
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
a,b,c,d,8,,,
a,b,c,d,,7,,
a,b,c,d,,,9,
a,b,p,e,8,,,
a.b,p,e,,9,,
a,b,p,z,,,,9
a,b,p,z,,8,,
desired output:
... (1 Reply)
Discussion started by: aksijain
1 Replies
7. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
8. Shell Programming and Scripting
I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Discussion started by: sljnk
7 Replies
9. Shell Programming and Scripting
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Discussion started by: newstart
9 Replies
10. Shell Programming and Scripting
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
Discussion started by: winston6071
0 Replies
LEARN ABOUT OSF1
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)