04-18-2012
This will give me the sum of all. But what I want is the sum of each entry + Previous to form a column like the one obove. Is that doable?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there
If I run a 'swap -l' on my solaris box, i get
swapfile dev swaplo blocks free
/dev/dsk/c1t0d0s1 54,65 8 67119560 65655144
/dev/dsk/c1t0d0s2 54,65 8 33119522 32655122
I wanted to run a for loop adding up the totals of each column 4 , excluding the... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
2. Shell Programming and Scripting
I'm trying to add the paths of all the xml files in certain directories to an array. I want to use the array later in my code. Anyway, for some reason this isn't working. Any help would be appreciated.
Path_Counter=0
for result in "find * -name '*.xml'"; do
XmlPath="$result"
echo... (2 Replies)
Discussion started by: Fly_Moe
2 Replies
3. Shell Programming and Scripting
Here is one I am baffled with; I have not used unix for a while and now that I am back it has been fun remembering and I have enjoyed it, for the most past. this is in ksh.
I need to search in a file for the line with X1 and cut columns 20-25, put them into a variable, added them (dollar... (3 Replies)
Discussion started by: CougarMutt
3 Replies
4. Shell Programming and Scripting
Hello ,
When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies
5. Shell Programming and Scripting
Dear experts,
I'm using solaris 5.10 and bash. I want to zip file "Amount.txt" to "Amount.zip" and rename it to "Amount_<prev_month>_<this year>.zip". For example, file for this month should be renamed to "Amount_06_2012.zip", for next month it should be "Amount_07_2012.zip". I have no problem... (8 Replies)
Discussion started by: kris.adrianto
8 Replies
6. Shell Programming and Scripting
I want to remove commands having no output. In below text file.
bash-3.2$ cat abc_do_it.txt
grpg10so>show trunk group all status
grpg11so>show trunk group all status
grpg12so>show trunk group all status
GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Discussion started by: Raza Ali
4 Replies
7. Shell Programming and Scripting
Hello:
I am bit puzzled with what I could be doing wrong and any help is appreciated.
I have a date in YYYMMDD format and I need to find the previous date. Based on the input on this forum, I have come up with the following. It seems to work for all except the following. Here I am passing date... (3 Replies)
Discussion started by: wincrazy
3 Replies
8. Shell Programming and Scripting
I have a shell script that looks something like the following:
mysql -uroot db1 < db1.sql
mysql -uroot db2 < db2.sql
mysql -uroot db3 < db3.sql
mysql -uroot db4 < db4.sql
....
different db names in more than 160 lines.
I want to run this script with nohup and have a status later.
So,... (6 Replies)
Discussion started by: MKH
6 Replies
9. UNIX for Beginners Questions & Answers
Hi There
Just created a .sql script and executes fine, it comes back with two lines of results, I was wondering is there a way of adding up the two results to get a round number. I tired wc -l but that didn't work.
Many Thanks for your help
psql -t -f... (3 Replies)
Discussion started by: simpsa27
3 Replies
10. Shell Programming and Scripting
Good morning all,
This is the file name in question OD_Orders_2019-02-19.csv
I am trying to create a bash script to read into files with yesterdays date on the file name while retaining the rest of the files name. I would like for $y to equal, the name of the file with a formula output with... (2 Replies)
Discussion started by: Ibrahim A
2 Replies
LEARN ABOUT CENTOS
slassq
slassq.f(3) LAPACK slassq.f(3)
NAME
slassq.f -
SYNOPSIS
Functions/Subroutines
subroutine slassq (N, X, INCX, SCALE, SUMSQ)
SLASSQ updates a sum of squares represented in scaled form.
Function/Subroutine Documentation
subroutine slassq (integerN, real, dimension( * )X, integerINCX, realSCALE, realSUMSQ)
SLASSQ updates a sum of squares represented in scaled form.
Purpose:
SLASSQ returns the values scl and smsq such that
( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is
assumed to be non-negative and scl returns the value
scl = max( scale, abs( x( i ) ) ).
scale and sumsq must be supplied in SCALE and SUMSQ and
scl and smsq are overwritten on SCALE and SUMSQ respectively.
The routine makes only one pass through the vector x.
Parameters:
N
N is INTEGER
The number of elements to be used from the vector X.
X
X is REAL array, dimension (N)
The vector for which a scaled sum of squares is computed.
x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
INCX
INCX is INTEGER
The increment between successive values of the vector X.
INCX > 0.
SCALE
SCALE is REAL
On entry, the value scale in the equation above.
On exit, SCALE is overwritten with scl , the scaling factor
for the sum of squares.
SUMSQ
SUMSQ is REAL
On entry, the value sumsq in the equation above.
On exit, SUMSQ is overwritten with smsq , the basic sum of
squares from which scl has been factored out.
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
September 2012
Definition at line 104 of file slassq.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 slassq.f(3)