10-16-2013
Could you please show us your attempts at solving the problem. Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Discussion started by: kkraja
6 Replies
2. Shell Programming and Scripting
Hi,
I want to replace the srting '; with ABCD'; in a file from line 1 to line 65. Is there any single command to do it without using awk
Thanks for quick reply
https://www.unix.com/images/misc/progress.gif (3 Replies)
Discussion started by: tosattam
3 Replies
3. Shell Programming and Scripting
Hello all, the title makes this sound simple, and maybe it should be.
This is by code:
#!/bin/sh
cp ch25.txt ch25.fn.tex
n=`grep -c '^\' ch25_footnotes.txt > temp`
r=`awk -F] '{print $2}' temp`
`sed 's/\/\\footnote{$r}/' ch25.fn.tex`
done
This is what I am trying to... (6 Replies)
Discussion started by: ccox85
6 Replies
4. Shell Programming and Scripting
I have a file which contains several lines. Sample content of the file is as below.
OK testmessage email<test@123>
NOK receivemessage email<123@test>
NOK receivemessage email(123@test123)
NOK receivemessage email<abc@test>
i would like to know by scripting will... (10 Replies)
Discussion started by: ramasar
10 Replies
5. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies
6. Shell Programming and Scripting
Hi
I am not the best scripter in the world and have run into a issue which you might be able to guide me on...
I have two files.
File1 :
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
File2:
C345,... (5 Replies)
Discussion started by: luckycharm
5 Replies
7. Shell Programming and Scripting
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
Discussion started by: biztank
8 Replies
8. Shell Programming and Scripting
Hi,
I want to achieve something similar to what described in another post:
The difference is I want to add the line if the pattern is not found.
File 1:
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
... (11 Replies)
Discussion started by: jyu3
11 Replies
9. Shell Programming and Scripting
I don't know if it's been asked before but seems i gave up seeking.
i have 2 files :
file1.txt
Monday XXXX
Tuesday XXXX
XXXX Wednesday
Thursday XXXX
XXXX is in every lines of file1.txt and i want to replace them with each line in file2.txt:
home
school
cinema
so output file is:
... (19 Replies)
Discussion started by: perseous
19 Replies
10. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT REDHAT
slalsd
SLALSD(l) ) SLALSD(l)
NAME
SLALSD - use the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each
column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS
SYNOPSIS
SUBROUTINE SLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND, RANK, WORK, IWORK, INFO )
CHARACTER UPLO
INTEGER INFO, LDB, N, NRHS, RANK, SMLSIZ
REAL RCOND
INTEGER IWORK( * )
REAL B( LDB, * ), D( * ), E( * ), WORK( * )
PURPOSE
SLALSD uses the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each
column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS. The solution X overwrites B. The singular values of A
smaller than RCOND times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm
solution is returned. The actual singular values are returned in D in ascending order.
This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on
those binary machines without guard digits which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2. It could conceivably fail on
hexadecimal or decimal machines without guard digits, but we know of none.
ARGUMENTS
UPLO (input) CHARACTER*1
= 'U': D and E define an upper bidiagonal matrix.
= 'L': D and E define a lower bidiagonal matrix.
SMLSIZ (input) INTEGER The maximum size of the subproblems at the bottom of the computation tree.
N (input) INTEGER
The dimension of the bidiagonal matrix. N >= 0.
NRHS (input) INTEGER
The number of columns of B. NRHS must be at least 1.
D (input/output) REAL array, dimension (N)
On entry D contains the main diagonal of the bidiagonal matrix. On exit, if INFO = 0, D contains its singular values.
E (input) REAL array, dimension (N-1)
Contains the super-diagonal entries of the bidiagonal matrix. On exit, E has been destroyed.
B (input/output) REAL array, dimension (LDB,NRHS)
On input, B contains the right hand sides of the least squares problem. On output, B contains the solution X.
LDB (input) INTEGER
The leading dimension of B in the calling subprogram. LDB must be at least max(1,N).
RCOND (input) REAL
The singular values of A less than or equal to RCOND times the largest singular value are treated as zero in solving the least
squares problem. If RCOND is negative, machine precision is used instead. For example, if diag(S)*X=B were the least squares prob-
lem, where diag(S) is a diagonal matrix of singular values, the solution would be X(i) = B(i) / S(i) if S(i) is greater than
RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to RCOND*max(S).
RANK (output) INTEGER
The number of singular values of A greater than RCOND times the largest singular value.
WORK (workspace) REAL array, dimension at least
(9*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2), where NLVL = max(0, INT(log_2 (N/(SMLSIZ+1))) + 1).
IWORK (workspace) INTEGER array, dimension at least
(3*N*NLVL + 11*N)
INFO (output) INTEGER
= 0: successful exit.
< 0: if INFO = -i, the i-th argument had an illegal value.
> 0: The algorithm failed to compute an singular value while working on the submatrix lying in rows and columns INFO/(N+1) through
MOD(INFO,N+1).
FURTHER DETAILS
Based on contributions by
Ming Gu and Ren-Cang Li, Computer Science Division, University of
California at Berkeley, USA
Osni Marques, LBNL/NERSC, USA
LAPACK version 3.0 15 June 2000 SLALSD(l)