Sponsored Content
Top Forums Shell Programming and Scripting Is it possible to draw table/matrix using shell script? Post 302298563 by lahiru on Wednesday 18th of March 2009 02:06:36 AM
Old 03-18-2009
Use arrays to this senarioo.Think it's really easy

myarray=(`cat table.dat|nawk '{print $1}'` `cat table.dat|nawk '{print $2}'`)

After this Your data will get insert in to the myarray.

Then you can fetch data from the array
as below.

${myarray[$0,$1]}

Regards,
Lahiru Jeewantha

Quote:
Originally Posted by jakSun8
Hi all,
I need to create a matrix of variable rows and columns. Right now i have 3 rows and two columns and following values.

Output something like
TypeA TypeB
TestCase1 Pass Fail
TestCase2 Pass NA
TestCase3 Pass Pass

Any help is much appreciated.
Thanks,
Jak
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Table to Matrix

Hi, I have a table in the format: 1 0 -1 1 0 2 0 1 -1 0 0 0 3 0 1 1 0 0 0 0 0 0 etc. I am trying to input this to a program, however it is complaining about the fact that it is not in matrix format. How do I add 0's to end of the rows to make them even? Thanks in advance! (2 Replies)
Discussion started by: Rhavin
2 Replies

2. Shell Programming and Scripting

Read in Table as a matrix

Dear forum users, i'm trying to read a table with 40x122 data in a array. Following this, i'd plot each rows again the header of the file in gnuplot. i was thinking for something like that #!/bin/bash # reads from the $ips file and assigns to $MYARRAY #IFS =";" split the line after the... (6 Replies)
Discussion started by: servuskelb
6 Replies

3. Shell Programming and Scripting

How to sort matrix table in UNIX?

Hello All, i have a file sort.txt with below entries. 1 12 10 16 6 4 20 8 15 i need to sort these entries and the out put should come in a single line. 1 4 6 8 10 12 15 16 20 Can you please help me sort this out? (2 Replies)
Discussion started by: sureshk_85
2 Replies

4. Shell Programming and Scripting

Shell Script Table

Hi, i need a bit help. I must write a script with shell- and sed-commands, which reads a table from stdin and writes a html-table on stdout (so i can open it with a web browser). The number of columns must be a parameter for the script, so i can start it for example with: "./htmltab.sh 3... (3 Replies)
Discussion started by: scruffytramp
3 Replies

5. Shell Programming and Scripting

awk to convert table-by-row to matrix table

Hello, I need some help to reformat this table-by-row to matrix? infile: site1 A:o,p,q,r,s,t site1 C:y,u site1 T:v,w site1 -:x,z site2 A:p,r,t,v,w,z site2 C:u,y site2 G:q,s site2 -:o,x site3 A:o,q,s,t,u,z site3 C:y site3 T:v,w,x site3 -:p,routfile: SITE o p q r s t v u w x y... (7 Replies)
Discussion started by: yifangt
7 Replies

6. Shell Programming and Scripting

How can draw line on Ubuntu, shell programming?

https://www.unix.com/attachment.php?attachmentid=6304&d=1432179166 how can draw line like this? on ubuntu, shell programming. i tried "-" , " l " but it's failed.. (2 Replies)
Discussion started by: gotit
2 Replies

7. UNIX for Beginners Questions & Answers

UNIX shell script for matrix insertion into a file

I have a script which is extracting data from a database in an excel file in below given format, date_time calling_app1 count of requests date calling_app x 34 date calling_app y 1034 I want to write a script which will write data into a file like this ... (3 Replies)
Discussion started by: TNT47
3 Replies

8. UNIX for Beginners Questions & Answers

Shell script to Split matrix file with delimiter into multiple files

I have a large semicolon delimited file with thousands of columns and many thousands of line. It looks like: ID1;ID2;ID3;ID4;A_1;B_1;C_1;A_2;B_2;C_2;A_3;B_3;C_3 AA;ax;ay;az;01;02;03;04;05;06;07;08;09 BB;bx;by;bz;03;05;33;44;15;26;27;08;09 I want to split this table in to multiple files: ... (1 Reply)
Discussion started by: trymega
1 Replies
clarcm.f(3)							      LAPACK							       clarcm.f(3)

NAME
clarcm.f - SYNOPSIS
Functions/Subroutines subroutine clarcm (M, N, A, LDA, B, LDB, C, LDC, RWORK) CLARCM Function/Subroutine Documentation subroutine clarcm (integerM, integerN, real, dimension( lda, * )A, integerLDA, complex, dimension( ldb, * )B, integerLDB, complex, dimension( ldc, * )C, integerLDC, real, dimension( * )RWORK) CLARCM Purpose: CLARCM performs a very simple matrix-matrix multiplication: C := A * B, where A is M by M and real; B is M by N and complex; C is M by N and complex. Parameters: M M is INTEGER The number of rows of the matrix A and of the matrix C. M >= 0. N N is INTEGER The number of columns and rows of the matrix B and the number of columns of the matrix C. N >= 0. A A is REAL array, dimension (LDA, M) A contains the M by M matrix A. LDA LDA is INTEGER The leading dimension of the array A. LDA >=max(1,M). B B is REAL array, dimension (LDB, N) B contains the M by N matrix B. LDB LDB is INTEGER The leading dimension of the array B. LDB >=max(1,M). C C is COMPLEX array, dimension (LDC, N) C contains the M by N matrix C. LDC LDC is INTEGER The leading dimension of the array C. LDC >=max(1,M). RWORK RWORK is REAL array, dimension (2*M*N) Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 115 of file clarcm.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 clarcm.f(3)
All times are GMT -4. The time now is 12:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy