Never assume? This works for any string after the = until you hit white space, end of line, comma or semicolon, like ="${boo#*xyz}":
Code:
sed 's/=[^ \t,;]*/=0/g'
We often assume from small data samples provided here, which is a real bad habit in the real world. In the real world, it is good to do some data checking with as big a data set as possible.
Of course, the requirements are just as terse! That is where active listening comes in!
Is there an easier way to do the following:
echo "|||||||" | sed 's/||/|0|/g; s/||/|0|/g'
which would give the following
|0|0|0|0|0|0|
If it is not run twice it will not pick up the second occurance of the || and leave it empty as in
echo "|||||||" | sed 's/||/|0|/g'
which would give... (3 Replies)
Hello
My file looks like that =>
12.56 have then 7888778.2566 what 44454.54545
878787.66565 if else 4445.54545455
I want to change all '.' on ',' .
I'm trying to do it with sed but I don't know chow to build regular expression to
change 454.4466 on 454,4466 ? (13 Replies)
hi
is it possible to cut this two semicolon separated sed commands
echo "string2 string3 string1" | sed s'/string1//g;s/string2//g'
output: " string3 "
to just one sed command without semicolon?
thanks in advance
funksen (10 Replies)
I have a file
CREATE TABLE DDD_EXT --- 1000
(
val u1
val u1
);
CREATE TABLE dsdasd_EXT --- 1323
(
val u1
val u1
);
CREATE TABLE AAAAAA_EXT --- 1222
(
val u1
val u1
);
CREATE TABLE E_EXT --- 11
(
val u1
val u1 (2 Replies)
I have the following line an in input file I want to digest with sed and simple replace the bold part with a variable defined in my bash script. I can do this in several sed operations but I know there must be a way to do it in a single sed line. What is the syntax?
Line in file:... (1 Reply)
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)
I don't understand this command behavior.
echo "abc" |sed 's/a/&_&/' (4 Replies)
Discussion started by: Vartika18
4 Replies
LEARN ABOUT DEBIAN
slasd5.f
slasd5.f(3) LAPACK slasd5.f(3)NAME
slasd5.f -
SYNOPSIS
Functions/Subroutines
subroutine slasd5 (I, D, Z, DELTA, RHO, DSIGMA, WORK)
SLASD5
Function/Subroutine Documentation
subroutine slasd5 (integerI, real, dimension( 2 )D, real, dimension( 2 )Z, real, dimension( 2 )DELTA, realRHO, realDSIGMA, real, dimension( 2
)WORK)
SLASD5
Purpose:
This subroutine computes the square root of the I-th eigenvalue
of a positive symmetric rank-one modification of a 2-by-2 diagonal
matrix
diag( D ) * diag( D ) + RHO * Z * transpose(Z) .
The diagonal entries in the array D are assumed to satisfy
0 <= D(i) < D(j) for i < j .
We also assume RHO > 0 and that the Euclidean norm of the vector
Z is one.
Parameters:
I
I is INTEGER
The index of the eigenvalue to be computed. I = 1 or I = 2.
D
D is REAL array, dimension (2)
The original eigenvalues. We assume 0 <= D(1) < D(2).
Z
Z is REAL array, dimension (2)
The components of the updating vector.
DELTA
DELTA is REAL array, dimension (2)
Contains (D(j) - sigma_I) in its j-th component.
The vector DELTA contains the information necessary
to construct the eigenvectors.
RHO
RHO is REAL
The scalar in the symmetric updating formula.
DSIGMA
DSIGMA is REAL
The computed sigma_I, the I-th updated eigenvalue.
WORK
WORK is REAL array, dimension (2)
WORK contains (D(j) + sigma_I) in its j-th component.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
November 2011
Contributors:
Ren-Cang Li, Computer Science Division, University of California at Berkeley, USA
Definition at line 117 of file slasd5.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.1 Sun May 26 2013 slasd5.f(3)