Input file File1:
xyz Date Name Age State
------------------------------------------------------------------------------------
DATA 12 Sep 2014 14:00 EST Alia 22 Chennai
SAND 12 Sep 2014 14:00 EST Alia 22 Chennai
DATA 12 Sep 2014 14:00 EST Ashika 22 Chennai
DATA 12 Sep 2014 14:00 EST Bosky 22 Chennai
DATA 12 Sep 2014 14:00 EST Swati 22 Chennai
Input file File2:
xyz Date Name Age State
------------------------------------------------------------------------------------
DATA 12 Sep 2014 14:00 EST Alia 22 Chennai
DATA 12 Sep 2014 14:00 EST Ashika 22 Chennai
DATA 12 Sep 2014 14:00 EST Bosky 22 Chennai
DATA 12 Sep 2014 14:00 EST Swati 22 Chennai
As you can see there are some extra leading and trailling spaces.
input file File4(removes DATA)(xls file)
Date Name Age State
-------------------------------------------------------------------------------
12Sep201414:00EST Alia 22 Chennai
12Sep201414:00EST Ashika 22 Chennai
12Sep201414:00EST Bosky 22 Chennai
12Sep201414:00EST Swati 22 Chennai
I dont want my date column to be edited with space i just want name age and state column to be removed the trailing and leading spaces.
Hello Sharma331,
Following may help you in same, please use code tags while posting commands and codes in posts.
Output will be as follows.
Thanks,
R. Singh
Last edited by RavinderSingh13; 10-01-2014 at 08:22 AM..
Reason: little editing for output
Hey ,
I have a file and it's having spaces for some of the fields in it. Like the one below. I want to remove the spaces in them through out the file. The spaces occur randomly and i can't say which field is having space. So please help. Here is sample file with spaces after 5th field. (3 Replies)
I'm currently writing my sql results to a file and they have trailing spaces after each field. I want to get rid of these spaces and I'm using this code:
TVXTEMP=$(echo $TVXTEMP|sed -e 's/\ //g')
It doesn't work though. I'm not familiar with sedscript, and the other codes I've found online... (6 Replies)
hi
i have a file which store some data.the contents of my file is
data1:data2
data3:data4
i have a script which read this file
correct="$(cat /root/sh | cut -d: -f1)"
i used this syntax..please help me which syntax is used to remove blank spaces..then how to read this file.. (1 Reply)
hey,
I have this file:
ATOM 2510 HG12 VAL 160 8.462 15.861 1.637
ATOM 2511 HG13 VAL 160 9.152 14.510 0.725
ATOM 2512 CG2 VAL 160 6.506 16.579 -0.088
ATOM 2513 HG21 VAL 160 5.499 16.421 -0.478
ATOM 2514 HG22 VAL 160 6.417 16.984 ... (4 Replies)
Hi,
I have a text as below
test1 test2 test3\
test4 test5 test6 test7
newtest1 newtest2\
newtest3 newtest4 newtest5
And need this to be replaces to
test1 test2 test3 test4 test5 test6 test7
newtest1 newtest2 newtest3 newtest4 newtest5
So my requirement is to remove the EOL... (5 Replies)
hiii i have a file that contains spaces in the begining of a file till the middle the from there the txt would appear. hw can i remove those spaces and bring the text to the begining portion
file1
text starts from here (12 Replies)
I have a file which contains data such as that shown below. How do i remove all the blcnak spaces, before, during and at the end of each line in one command?
300015, 58.0823212, 230.424728
300016, 58.2276459, 229.141602
300017, 58.7590027, 226.960846
... (9 Replies)
Hi friends,
I have a file1.txt
1 | a | 4757634 | jund jdkj | erhyj
2 | a | 4757634 | jnd jdkj | rhje hjrhwj
i have used tr -d '\040' to remove the spcaes
output file
cat file1.txt | tr -d '\040'
1|a|4757634|jundjdkj|erhyj... (5 Replies)
Hi All,
The output file contains data as below.
"20141023","CUSTOMER" ,"COMPANY" ,"IN0515461" ,"" ,"JOSHUA"
There are spaces in between the ending " and ,. The number of spaces is random.
How can I remove that from the file so that the final output is:... (4 Replies)
I've tried various solutions to move a file name with spaces and nothing seems to work. I need to take a date as input, prepend it to a filename with spaces then remove the spaces and mv the file to the new name.
#!/bin/ksh
#
if (( $# != 1 ))
then
echo "Usage: `basename $0` <DATE> "
... (5 Replies)
Discussion started by: w_s_s
5 Replies
LEARN ABOUT CENTOS
clacn2
clacn2.f(3) LAPACK clacn2.f(3)NAME
clacn2.f -
SYNOPSIS
Functions/Subroutines
subroutine clacn2 (N, V, X, EST, KASE, ISAVE)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
Function/Subroutine Documentation
subroutine clacn2 (integerN, complex, dimension( * )V, complex, dimension( * )X, realEST, integerKASE, integer, dimension( 3 )ISAVE)
CLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
Purpose:
CLACN2 estimates the 1-norm of a square, complex matrix A.
Reverse communication is used for evaluating matrix-vector products.
Parameters:
N
N is INTEGER
The order of the matrix. N >= 1.
V
V is COMPLEX array, dimension (N)
On the final return, V = A*W, where EST = norm(V)/norm(W)
(W is not returned).
X
X is COMPLEX array, dimension (N)
On an intermediate return, X should be overwritten by
A * X, if KASE=1,
A**H * X, if KASE=2,
where A**H is the conjugate transpose of A, and CLACN2 must be
re-called with all the other parameters unchanged.
EST
EST is REAL
On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
unchanged from the previous call to CLACN2.
On exit, EST is an estimate (a lower bound) for norm(A).
KASE
KASE is INTEGER
On the initial call to CLACN2, KASE should be 0.
On an intermediate return, KASE will be 1 or 2, indicating
whether X should be overwritten by A * X or A**H * X.
On the final return from CLACN2, KASE will again be 0.
ISAVE
ISAVE is INTEGER array, dimension (3)
ISAVE is used to save variables between calls to SLACN2
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
September 2012
Further Details:
Originally named CONEST, dated March 16, 1988.
Last modified: April, 1999
This is a thread safe version of CLACON, which uses the array ISAVE
in place of a SAVE statement, as follows:
CLACON CLACN2
JUMP ISAVE(1)
J ISAVE(2)
ITER ISAVE(3)
Contributors:
Nick Higham, University of Manchester
References:
N.J. Higham, 'FORTRAN codes for estimating the one-norm of
a real or complex matrix, with applications to condition estimation', ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December
1988.
Definition at line 134 of file clacn2.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 clacn2.f(3)