I am trying to make a 4x4 matrix and I would greatly appreciate any help.
I have 4 text files and I want to do the following. I want to concatenate them and gzip them. Then I want to find the file size of the concatenated file and subtract the value of file A. Finally, I want to output this final value onto the matrix. I think the example will hopefully make more sense
Example: Suppose there is text A and text B
1. Concatenate them to make AB
2. Gzip AB to create AB.gzip
3. File size of AB.gzip MINUS file size of AB
4. Print the final value on the matrix
Repeat this until AB,AC,AD; BA,BC,BD; CA,CB,CD; DA,DB,DC is created.
Output should be a matrix:
EDIT: I'm going to make a 40x40 matrix which would require 1560 outputs. I made this example 4x4 for simplicity purposes
Moderator's Comments:
Please use CODE tags as required by forum rules when displaying sample input, sample output, and code segments.
Last edited by Don Cragun; 02-25-2017 at 05:23 PM..
Reason: Add CODE tags; remove CENTER tags containing no text to be centered.
If this is not homework, please explain the need for this project, let us know what operating system and shell you're using, and show us (in code tags) what you have tried solve this problem.
How is your script supposed to know which files to process? Are they always in a single directory? Can there be any other files in that directory (before you start cating and gziping)?
Cheers!
In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Hi everyone
I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
I am trying to code a 4 by 4 array. However the naming convention is diffrent.
Please refer the image below
https://lh5.googleusercontent.com/-Dl0vdjfXtU0/Tnh02_ORJpI/AAAAAAAAAKU/4c2zyFP9IB0/array.JPG
I want to name them in order :
from 0 to 3 --> (0,0) cell to (0,3)
from 4 to 7 --> (1,0)... (0 Replies)
Hi all,
Is there a way to convert full data matrix to linearised left data matrix?
e.g full data matrix
Bh1 Bh2 Bh3 Bh4 Bh5 Bh6 Bh7
Bh1 0 0.241058 0.236129 0.244397 0.237479 0.240767 0.245245
Bh2 0.241058 0 0.240594 0.241931 0.241975 ... (8 Replies)
Hi All
I would like to merge multiple files with the same row and column size into a matrix format
In a folder I have multiple files in the following format
vi 12.txt
a 1
b 5
c 7
d 0
vi 45.txt
a 3
b 6
c 9
d 2
vi 9.txt
a 4 (7 Replies)
hey all, im new and my first question is:
say i have a word "blahblah"
how do i get and replace the last letter of the word with say k, so replace the h with a k.
However you cant just replace the h it has to change the LAST LETTER of the word.
Cheers In advance.
:b: (0 Replies)