The single pass perl solution had is taking 2,5 times longer than the fastest sed solution. But it is twice as fast as the solutions that employed grouping. Interestingly when I tried this:
It was much faster and only about 20% slower than the equivalent fastest sed solution.
Last edited by Scrutinizer; 11-02-2010 at 07:32 PM..
Hello Awk Gurus,
Can anyone of you help me with the below problem. I have got a file having data in below format
pmFaultyTransportBlocks
-----------------------
9842993
pmFrmNoOfDiscRachFrames
-----------------------
NULL
pmNoRecRandomAccSuccess
-----------------------... (4 Replies)
Hi guys
task removing the last commas of 5th and 6th columns. The bug in the script is causing effect because of whitespaces around commas. I tried to delete white spaces first and running the above script. but still some where getting the results wrong.
I already have a script to do this... (12 Replies)
1. The problem statement, all variables and given/known data:
Problem Statement for project:
When an account is created on the CS Unix network, a
public html directory is created in the account's home directory. A default web page is put into that directory.
Some users replace or... (13 Replies)
Hi all,
I have a conf file, i want to update some entries in that conf file. Below is the code for that using a temporary file.
sed '/workgroup=/ c\workgroup=Workgroup' /usr/local/netx.conf > /usr/local/netx.conf.tmp
mv -f /usr/local/netx.conf.tmp /usr/local/netx.conf
Sample contents of... (9 Replies)
I have two files which I would like to compare and then manipulate in a way.
File1:
pictures.txt 1.1 1.3
dance.txt 1.2 1.4
treehouse.txt 1.3 1.5
File2:
pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244
dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2... (1 Reply)
Hello,
i have a file, i open the file and read the line, i want to get the first item in the csv file and also teh third+6 item and wirte it to a new csv file. only problem is that using echo it takes TOO LONG:
please help a newbie. below is my code:
WorkingDir=$1
FileName=`cut -d ',' -f... (2 Replies)
Hello all, I need some help with sed. seems like i cant get through it. So here is what i am trying. when i do ps -ef|grep bla blah ...like below...i get /u01/app/oracle/11g/bin/tnslsnr .... but i want to replace that string with something using sed. So basically i want to get rid of... (3 Replies)
With sed
1. I need to find a line that contains "DVM" and "73069".
2. I need to insert a double quote at the beginning of the first line of the file.
These two have been driving me crazy for the last 45 minutes. Any help would be greatly appreciated.
Thanks (3 Replies)
HI All,
I am new to unix. I have a file would like to do some editing by using awk, cut and sed. Could anyone help?
This file contain 100 lines. There are one line for example:
2,"102343454",5060,"579668","579668","579668","SIP",,,"825922","035885221283026",1,268,"00:59:00.782 APR 17... (2 Replies)
{
"AFafa": "FAFA","AFafa": "FAFA"
"baseball":"soccer","wrestling":"dancing"
"rhinos":"crocodiles","roles":"foodchain"
}
I need to insert a new line before the closing brackets "}" so that the final output looks like this:
{
"AFafa": "FAFA","AFafa": "FAFA"... (6 Replies)
Discussion started by: SkySmart
6 Replies
LEARN ABOUT REDHAT
sptrfs
SPTRFS(l) ) SPTRFS(l)
NAME
SPTRFS - improve the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite and
tridiagonal, and provides error bounds and backward error estimates for the solution
SYNOPSIS
SUBROUTINE SPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR, BERR, WORK, INFO )
INTEGER INFO, LDB, LDX, N, NRHS
REAL B( LDB, * ), BERR( * ), D( * ), DF( * ), E( * ), EF( * ), FERR( * ), WORK( * ), X( LDX, * )
PURPOSE
SPTRFS improves the computed solution to a system of linear equations when the coefficient matrix is symmetric positive definite and tridi-
agonal, and provides error bounds and backward error estimates for the solution.
ARGUMENTS
N (input) INTEGER
The order of the matrix A. N >= 0.
NRHS (input) INTEGER
The number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
D (input) REAL array, dimension (N)
The n diagonal elements of the tridiagonal matrix A.
E (input) REAL array, dimension (N-1)
The (n-1) subdiagonal elements of the tridiagonal matrix A.
DF (input) REAL array, dimension (N)
The n diagonal elements of the diagonal matrix D from the factorization computed by SPTTRF.
EF (input) REAL array, dimension (N-1)
The (n-1) subdiagonal elements of the unit bidiagonal factor L from the factorization computed by SPTTRF.
B (input) REAL array, dimension (LDB,NRHS)
The right hand side matrix B.
LDB (input) INTEGER
The leading dimension of the array B. LDB >= max(1,N).
X (input/output) REAL array, dimension (LDX,NRHS)
On entry, the solution matrix X, as computed by SPTTRS. On exit, the improved solution matrix X.
LDX (input) INTEGER
The leading dimension of the array X. LDX >= max(1,N).
FERR (output) REAL array, dimension (NRHS)
The forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution
corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by
the magnitude of the largest element in X(j).
BERR (output) REAL array, dimension (NRHS)
The componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B
that makes X(j) an exact solution).
WORK (workspace) REAL array, dimension (2*N)
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
PARAMETERS
ITMAX is the maximum number of steps of iterative refinement.
LAPACK version 3.0 15 June 2000 SPTRFS(l)