Sponsored Content
Top Forums Shell Programming and Scripting How to changes rows to columns in a file Post 302220143 by oracle123 on Thursday 31st of July 2008 02:21:27 AM
Old 07-31-2008
Thank You So much
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Convert Columns to Rows in a File

Hi I have a input file in the format ABC,111,2008Q2, 49K ABC,111,2008Q3, 0K ABC,111,2008Q4, 0K ABC,222,2008Q2, 49K ABC,222,2008Q3, 0K ABC,222,2008Q4, 0K XYZ,111,2008Q2, 49K XYZ,111,2008Q3, 0K XYZ,111,2008Q4, 0K XYZ,222,2008Q2, 49K XYZ,222,2008Q3, 0K XYZ,222,2008Q4, 0K The output file... (3 Replies)
Discussion started by: chrismt
3 Replies

2. Shell Programming and Scripting

Rows to Columns - File Transpose

Hi I have an input file and I want to transpose it but I need to take care that if any field is missing for a record it should be popoulated with space for that field - using a shell script INFILE ---------- emp=1 sal=2 loc=abc emp=2 sal=21 sal=22 loc=xyz emp=5 loc=abc OUTFILE... (10 Replies)
Discussion started by: 46019
10 Replies

3. Shell Programming and Scripting

Changing file with rows and columns into just 1 column

Hi I need a bash shell script that will take text files with 4 rows and different numbers of columns in each row and convert each one into a text file with just one column. I then subtract 1.5 from each number in the column (I have that part already) The next step after that is I want to have... (10 Replies)
Discussion started by: ac130pilot
10 Replies

4. Shell Programming and Scripting

Large file - columns into rows etc

I have done a couple of searches on this and have found many threads but I don't think I've found one that is useful to me - probably because I have very basic comprehension of perl and beginners shell so trying to manipulate a script already posted maybe beyond my capabilities.... Anyway - I... (26 Replies)
Discussion started by: Myrona
26 Replies

5. UNIX for Dummies Questions & Answers

Audit Flat File - # of Columns / Rows

We receive a file which usually has 40 to 50 million rows. I want to set up an audit process by which everytime we receive a file we audit it for # of rows and total number of columns. So if the # of rows is around 1 million on a particular day, I want to raise a flag or send an email....and if... (3 Replies)
Discussion started by: priya33184
3 Replies

6. Shell Programming and Scripting

Convert columns to rows in a file

Hello, I have a huge tab delimited file with around 40,000 columns and 900 rows I want to convert columns to a row. INPUT file look like this. the first line is a headed of a file. ID marker1 marker2 marker3 marker4 b1 A G A C ... (5 Replies)
Discussion started by: ryan9011
5 Replies

7. UNIX for Dummies Questions & Answers

Swapping the columns of a text file for a subset of rows

Hi, I'd like to swap the columns 1 and 2 of a space-delimited text file but only for the first 1000 rows. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. Shell Programming and Scripting

Converting rows to columns in csv file

Hi, I have a requirement to convert rows into columns. data looks like: c1,c2,c3,.. r1,r2,r3,.. p1,p2,p3,.. and so on.. output shud be like this: c1,r1,p1,.. c2,r2,p2,.. c3,r3,p3,.. Thanks in advance, (12 Replies)
Discussion started by: Divya1987
12 Replies

9. Shell Programming and Scripting

Deleting all the fields(columns) from a .csv file if all rows in that columns are blanks

Hi Friends, I have come across some files where some of the columns don not have data. Key, Data1,Data2,Data3,Data4,Data5 A,5,6,,10,, A,3,4,,3,, B,1,,4,5,, B,2,,3,4,, If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies

10. Shell Programming and Scripting

Character screening and paste into new file in columns instead of rows

QL10169_SAUJANA%SubNetwork=ONRM_ROOT_MO_R,SubNetwork=ERBS_KCRN11,MeContext=QL10169_SAUJANA_5 %External_Link_Failure %X2_link_problem_to_one_or_several_neighbouring_eNodeBs. QL10187_MATANG_JAYA_2%SubNetwork=ONRM_ROOT_MO_R,SubNetwork=ERBS_KUCHING,MeContext=QL10187_MATANG_JAY A_2_3... (2 Replies)
Discussion started by: Ankit Vyas
2 Replies
mlib_MatrixMulSShift_U8_Mod(3MLIB)			    mediaLib Library Functions				mlib_MatrixMulSShift_U8_Mod(3MLIB)

NAME
mlib_MatrixMulSShift_U8_Mod, mlib_MatrixMulSShift_U8_Sat, mlib_MatrixMulSShift_U8C_Mod, mlib_MatrixMulSShift_U8C_Sat, mlib_Matrix- MulSShift_S8_Mod, mlib_MatrixMulSShift_S8_Sat, mlib_MatrixMulSShift_S8C_Mod, mlib_MatrixMulSShift_S8C_Sat, mlib_MatrixMulSShift_S16_Mod, mlib_MatrixMulSShift_S16_Sat, mlib_MatrixMulSShift_S16C_Mod, mlib_MatrixMulSShift_S16C_Sat, mlib_MatrixMulSShift_S32_Mod, mlib_Matrix- MulSShift_S32_Sat, mlib_MatrixMulSShift_S32C_Mod, mlib_MatrixMulSShift_S32C_Sat - matrix multiplication by scalar plus shifting, in place SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_MatrixMulSShift_U8_Mod(mlib_u8 *xz, const mlib_u8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_U8_Sat(mlib_u8 *xz, const mlib_u8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_U8C_Mod(mlib_u8 *xz, const mlib_u8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_U8C_Sat(mlib_u8 *xz, const mlib_u8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S8_Mod(mlib_s8 *xz, const mlib_s8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S8_Sat(mlib_s8 *xz, const mlib_s8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S8C_Mod(mlib_s8 *xz, const mlib_s8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S8C_Sat(mlib_s8 *xz, const mlib_s8 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S16_Mod(mlib_s16 *xz, const mlib_s16 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S16_Sat(mlib_s16 *xz, const mlib_s16 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S16C_Mod(mlib_s16 *xz, const mlib_s16 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S16C_Sat(mlib_s16 *xz, const mlib_s16 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S32_Mod(mlib_s32 *xz, const mlib_s32 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S32_Sat(mlib_s32 *xz, const mlib_s32 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S32C_Mod(mlib_s32 *xz, const mlib_s32 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); mlib_status mlib_MatrixMulSShift_S32C_Sat(mlib_s32 *xz, const mlib_s32 *c, mlib_s32 m, mlib_s32 n, mlib_s32 shift); DESCRIPTION
Each of these functions performs an in-place multiplication of a matrix with a scalar and shifts the result. For real data, the following equation is used: xz[i] = c[0]*xz[i]*2**(-shift) where i = 0, 1, ..., (m*n - 1). For complex data, the following equation is used: tmp = xz[2*i] xz[2*i] = (c[0]*tmp - c[1]*xz[2*i + 1])*2**(-shift) xz[2*i + 1] = (c[1]*tmp + c[0]*xz[2*i + 1])*2**(-shift) where i = 0, 1, ..., (m*n - 1). The ranges of valid shift are: 1 <= shift <= 8 for U8, S8, U8C, S8C types 1 <= shift <= 16 for S16, S16C types 1 <= shift <= 31 for S32, S32C types PARAMETERS
Each of the functions takes the following arguments: xz Pointer to the source and destination matrix. c Pointer to the source scalar. When the function is used with complex data types, c[0] contains the scalar for the real part, and c[1] contains the scalar for the imaginary part. m Number of rows in each matrix. n Number of columns in each matrix. shift Right shifting factor. RETURN VALUES
Each of the functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_MatrixMulSShift_U8_U8_Mod(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_MatrixMulSShift_U8_Mod(3MLIB)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy