In a shell script, how I can achieve substitution of shell script var to a regular
expression, as shown below.
var=`head -1 file1`
awk '$0!~/$var/ {print $0}' file1 > file2
In the case above $var value literally considered for non-exists criteria. (3 Replies)
Hello!
I've got txt-file containing lots of data in sentences like this:
;;BA;00:00:03:00;COM;CLOQUET-LAFOLLYE;SIMON;
but sometime more than on in a line like this:
;;BA;00:00:03:00;COM;CLOQUET-LAFOLLYE;SIMON;;;BA;00:00:03:00;REA;RTL9;;;;BAC;:00;TIT;SEMAINE SPECIALE ~SSLOGAN~T DVD;;
... (3 Replies)
Hi there!
I'm trying to validate a simple 6 digits number with reg expr. I ONLY want 6 digits so when i type 7 digits the script should no validate the number.
I've write this code:
#!/usr/bin/perl
while(<STDIN>){
if($_=~/\d{6}/){
print "Bingo!\n";
... (2 Replies)
Hello,
I am new in perl and in regular exprecion; so I am looking for help (or an experienced advise.)
The target is a triming spaces from a string: i.e., remove spases from begining and from end of a string.
One of main point of a searched solution is performance: for current task it is... (2 Replies)
Hi All,
I am in need of help. I want to match a value of each row in “file 1” with the value of first row in “file 2” and print out only the columns that match. How can I do it in awk? Any help is greatly appreciated.
for example, I have two files:
Cat “File 1”
ID
3
8
15
Cat “File... (2 Replies)
Hi All,
I need your input on how to mask out / ignore a string that does not match a working regular expression (continually refining) pattern in Java. Below is the code snippet which is picking up all the lines with the correct regular expression string except one known so far:
public... (0 Replies)
Hi,
I have a file filled with search strings which have a blank in between and look like this:
S. g. Ehr.
o. Jg.
v. d. Chijs
g. Ehr.
Now i would like to search for the strings and it also shall return the next column after the match.
awk -v FILE="search_strings.txt" 'BEGIN {... (10 Replies)
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
LEARN ABOUT REDHAT
zspmv
ZSPMV(l) ) ZSPMV(l)
NAME
ZSPMV - perform the matrix-vector operation y := alpha*A*x + beta*y,
SYNOPSIS
SUBROUTINE ZSPMV( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY )
CHARACTER UPLO
INTEGER INCX, INCY, N
COMPLEX*16 ALPHA, BETA
COMPLEX*16 AP( * ), X( * ), Y( * )
PURPOSE
ZSPMV performs the matrix-vector operation y := alpha*A*x + beta*y, where alpha and beta are scalars, x and y are n element vectors and A
is an n by n symmetric matrix, supplied in packed form.
ARGUMENTS
UPLO - CHARACTER*1
On entry, UPLO specifies whether the upper or lower triangular part of the matrix A is supplied in the packed array AP as follows:
UPLO = 'U' or 'u' The upper triangular part of A is supplied in AP.
UPLO = 'L' or 'l' The lower triangular part of A is supplied in AP.
Unchanged on exit.
N - INTEGER
On entry, N specifies the order of the matrix A. N must be at least zero. Unchanged on exit.
ALPHA - COMPLEX*16
On entry, ALPHA specifies the scalar alpha. Unchanged on exit.
AP - COMPLEX*16 array, dimension at least
( ( N*( N + 1 ) )/2 ). Before entry, with UPLO = 'U' or 'u', the array AP must contain the upper triangular part of the symmetric
matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2
) respectively, and so on. Before entry, with UPLO = 'L' or 'l', the array AP must contain the lower triangular part of the symmet-
ric matrix packed sequentially, column by column, so that AP( 1 ) contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a(
3, 1 ) respectively, and so on. Unchanged on exit.
X - COMPLEX*16 array, dimension at least
( 1 + ( N - 1 )*abs( INCX ) ). Before entry, the incremented array X must contain the N- element vector x. Unchanged on exit.
INCX - INTEGER
On entry, INCX specifies the increment for the elements of X. INCX must not be zero. Unchanged on exit.
BETA - COMPLEX*16
On entry, BETA specifies the scalar beta. When BETA is supplied as zero then Y need not be set on input. Unchanged on exit.
Y - COMPLEX*16 array, dimension at least
( 1 + ( N - 1 )*abs( INCY ) ). Before entry, the incremented array Y must contain the n element vector y. On exit, Y is overwritten
by the updated vector y.
INCY - INTEGER
On entry, INCY specifies the increment for the elements of Y. INCY must not be zero. Unchanged on exit.
LAPACK version 3.0 15 June 2000 ZSPMV(l)