10-26-2009
Program for pairing together to print outputusing perl
Suppose u have One file
one row and one column
A1 A2 A3 A4
A1
A2
A3
A4
And another Second file shows pairing
A1 A4
A2 A3
A2 A4
A1 A3
Want the output to be like based on the pairing ..
As seen from the second fileThose who are paired will get one A1 A4 will get one
same with A1 A3 will get one
A1 A2 will get zero
A1 A2 A3 A4
A1 0 0 1 1
A2 0 0 1 1
A3 1 1 0 0
A4 1 1 0 0
What can be done ?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
Is there any UNIX program (or Mac OSX) that works with delimitted data files, manipulates the data into a letter / layout form and can then send multiple personalised forms to multiple printers? If this is not the right forum, can anyone point me in the right direction?
Thanks
Mike Taylor (5 Replies)
Discussion started by: miketaylor
5 Replies
2. Shell Programming and Scripting
hi All
I have a scritp running which connects to a local host and then gets a value from a field and then ftp that value to antoher server. It is running fine, and from crontab it gives the output to a file, the problem is sometime it doesnt run but if i check the output file it does not show one... (0 Replies)
Discussion started by: imran721
0 Replies
3. Shell Programming and Scripting
How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ?
Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies
4. Homework & Coursework Questions
Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies
5. Linux
Hi all,
I have a text data file. My aim here is to find line called *FIELD* AV for every record and print lines after that till *FIELD* RF. But here I want first 3 to four lines for very record as well. FIELD AV is some where in between for very record. SO I am not sure how to retrieve lines in... (2 Replies)
Discussion started by: kaav06
2 Replies
6. Shell Programming and Scripting
Hi,
Im trying to script the following logic but having some difficulties and wonder if you can help. Have tried to use "cut" to cut pairs but doesn't appear to do what i need when there are more than one pair. Also "wc -c" doesn't appear to be so easy to know which characters to strip of at
I... (3 Replies)
Discussion started by: bunti
3 Replies
7. Programming
The problem I'm having is that when you put in the two numbers the answer is just prime.... nothing. I cannot figure this out ive been working on this forever, can someone please god just tell me how to fix this without encrypted "hints".
#include <iostream>
#include <cmath>
using... (3 Replies)
Discussion started by: c++newb
3 Replies
8. Hardware
I have been trying to get bluetooth working correctly on Linux for a while now. I am using two systems that are having identical issues: Linux Mint 15 64-bit & Ubuntu 13.04 32-bit. Both are using the Cinnamon desktop. I have the following bluetooth dongle:
... (6 Replies)
Discussion started by: Deluge
6 Replies
9. Shell Programming and Scripting
Hello,
I'm trying to create a word translation section of a book. Each entry in the word list will come from a set of linguistically analyzed texts.
Each sentence in the text has the following format. The first element in each line is the "name" of the line (i.e. "A","B","C","D"). The... (12 Replies)
Discussion started by: John Lyon
12 Replies
10. Shell Programming and Scripting
I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade.
I have:
if ( $response =~ m/^/ ) {
$user_wants_to_quit... (1 Reply)
Discussion started by: germany1517
1 Replies
autofs(4) Kernel Interfaces Manual autofs(4)
NAME
autofs - file containing parameter values for daemon and command
SYNOPSIS
DESCRIPTION
The file resides in directory and supplies default parameters for the daemon and the command.
The file format is ASCII; comment lines begin with the crosshatch character. Parameters consist of a keyword followed by an equal sign
followed by the parameter value. This is the form of parameters in the file:
Initially the parameters in the file are commented out with the
Administrators can make changes to the startup parameters for by logging in as root and editing the file. They would uncomment out a key-
word-value line to make the value for that parameter take effect. Changes made to values on an or command line override values in
The following parameters are currently supported in the file:
Specifies a duration, in seconds, that a file system is to remain mounted
when not in use. The default value is 600 (10 minutes). Equivalent to the option in
Verbose mode for Causes you to be notified of non-critical events, such as mounts and unmounts. The default value is Equivalent to
the option in
Verbose mode for Causes status messages to be logged to the console. The default value is Equivalent to the option in
Turn on or off browsing for all
mount points. The default value is Equivalent to the option in
Expands each RPC call and displays it on standard output.
The default value, turns off such tracing. Starting with value and with each higher value, the verbosity of the
trace output increases.
Environment variables. Each environment variable-value pairing must be on its own line. You can specify multiple such pairings. There
are no environment variable settings supplied. For example:
AUTHOR
was developed by Sun Microsystems, Inc.
SEE ALSO
automount(1M), automountd(1M).
autofs(4)