03-19-2013
Drop the quotes on the right-hand side.
This User Gave Thanks to elixir_sinari For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
Consider the following magic words:
# ls `which adduser`
ls: /usr/sbin/adduser: No such file or directory
#
Hmmm...
Then:
# ls /usr/sbin/adduser
/usr/sbin/adduser
#
Now what?
Unforunately this little sniippet is used in my debian woody server's mysql pre install script.... (2 Replies)
Discussion started by: osee
2 Replies
2. UNIX for Dummies Questions & Answers
Portion of my script below :
if ; then
NUMBEROFFEILDS=`cat ${BASE_SCRIPT_LOC}/standardfilecleanup.lst|grep -w ${db_file_path}|awk -F: '{print NF}'`
COUNT=4
while ; do
awk_var="$"`echo $COUNT`
file_name1=`cat ${BASE_SCRIPT_LOC}/standardfilecleanup.lst|grep -w... (1 Reply)
Discussion started by: findprakash
1 Replies
3. Shell Programming and Scripting
total=0
seq 1 5 | while read i ; do
total=$(($total+$i))
echo $total
done
echo $totalThis outputs:
1
3
6
10
15
0whereas I am expecting:
1
3
6
10
15
15My bash version: (4 Replies)
Discussion started by: meharo
4 Replies
4. Shell Programming and Scripting
I am trying to get folder names that contain only numbers.
Can someone explain why following command is printing 'total 450' as part of output..
$> ls -lt | awk '$9 ~ /^*$/' | more
total 450
drwxr-x--x 3 user1 group1 512 Mar 9 2008 329227163
drwxr-x--x 3 user1 group1 ... (17 Replies)
Discussion started by: kchinnam
17 Replies
5. Shell Programming and Scripting
for i in `cat /export/home/afahmed/Arrvial_time.txt`
do
echo $i
echo $i | awk '$3 < $D { print $4 }' >> dynamic_DF.txt;
done
When i echo, its echo as
Nov
15
02:24
/export/home/pp_adm/inbound//wwallet_20111115.txt where i expect it to be Nov 15 02:24... (7 Replies)
Discussion started by: afahmed
7 Replies
6. Shell Programming and Scripting
case "$freq" in
" Hz") low=250; high=550;;
"8 Hz") low=250; high=1000;;
" Hz") low=400; high=1000;;
"63 Hz") low=550; high=1000;;
" Hz") low=400; high=550;;
... (2 Replies)
Discussion started by: Michael Stora
2 Replies
7. Shell Programming and Scripting
Hi,
I have prepared a script and trying to execute it but not getting expected output. Could you please help and advise what is going wrong.
"If else" part in below script is not working basically.
I am running it on HP-UX.
for i in slpd puma sfmdb
do
echo "******\t$i\t*******"
echo... (10 Replies)
Discussion started by: sv0081493
10 Replies
8. UNIX for Advanced & Expert Users
I ran into the following and still do not understand entirely the rationale behind this. If someone could explain why things are as they are I'd be thankful.
The following was tested on AIX 7.1 with ksh88, but i suspect that to be ubiquitous. In an installation routine i had to create a set of... (6 Replies)
Discussion started by: bakunin
6 Replies
9. Shell Programming and Scripting
Below is what i have in my script.
htcount=$(curl -s --user tomcatstatus:tomcatstatus http://`hostname`.mypc.com:887/manager/jmxproxy?qry=Catalina:type=ThreadPool,name=\"http-nio-887\" |grep sBusy | cut -d ' ' -f2)
echo $htcount
if ; then
echo "more than 10"
else
echo "Less than 10"
fi... (6 Replies)
Discussion started by: mohtashims
6 Replies
10. Shell Programming and Scripting
I'm having an issue with bash read input when using a case statement.
The script halts and doesn't read the input on the first loop. if I hit enter then the scripts starts to respond as expected. Need some help here.
defaultans=8hrs
read -e -i $defaultans -p "${bldwht}How long would you like... (5 Replies)
Discussion started by: woodson2
5 Replies
DLASR(l) ) DLASR(l)
NAME
DLASR - perform the transformation A := P*A, when SIDE = 'L' or 'l' ( Left-hand side ) A := A*P', when SIDE = 'R' or 'r' ( Right-hand
side ) where A is an m by n real matrix and P is an orthogonal matrix,
SYNOPSIS
SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
CHARACTER DIRECT, PIVOT, SIDE
INTEGER LDA, M, N
DOUBLE PRECISION A( LDA, * ), C( * ), S( * )
PURPOSE
DLASR performs the transformation A := P*A, when SIDE = 'L' or 'l' ( Left-hand side ) A := A*P', when SIDE = 'R' or 'r' ( Right-hand side )
where A is an m by n real matrix and P is an orthogonal matrix, consisting of a sequence of plane rotations determined by the parameters
PIVOT and DIRECT as follows ( z = m when SIDE = 'L' or 'l' and z = n when SIDE = 'R' or 'r' ):
When DIRECT = 'F' or 'f' ( Forward sequence ) then
P = P( z - 1 )*...*P( 2 )*P( 1 ),
and when DIRECT = 'B' or 'b' ( Backward sequence ) then
P = P( 1 )*P( 2 )*...*P( z - 1 ),
where P( k ) is a plane rotation matrix for the following planes:
when PIVOT = 'V' or 'v' ( Variable pivot ),
the plane ( k, k + 1 )
when PIVOT = 'T' or 't' ( Top pivot ),
the plane ( 1, k + 1 )
when PIVOT = 'B' or 'b' ( Bottom pivot ),
the plane ( k, z )
c( k ) and s( k ) must contain the cosine and sine that define the matrix P( k ). The two by two plane rotation part of the matrix P( k
), R( k ), is assumed to be of the form
R( k ) = ( c( k ) s( k ) ).
( -s( k ) c( k ) )
This version vectorises across rows of the array A when SIDE = 'L'.
ARGUMENTS
SIDE (input) CHARACTER*1
Specifies whether the plane rotation matrix P is applied to A on the left or the right. = 'L': Left, compute A := P*A
= 'R': Right, compute A:= A*P'
DIRECT (input) CHARACTER*1
Specifies whether P is a forward or backward sequence of plane rotations. = 'F': Forward, P = P( z - 1 )*...*P( 2 )*P( 1 )
= 'B': Backward, P = P( 1 )*P( 2 )*...*P( z - 1 )
PIVOT (input) CHARACTER*1
Specifies the plane for which P(k) is a plane rotation matrix. = 'V': Variable pivot, the plane (k,k+1)
= 'T': Top pivot, the plane (1,k+1)
= 'B': Bottom pivot, the plane (k,z)
M (input) INTEGER
The number of rows of the matrix A. If m <= 1, an immediate return is effected.
N (input) INTEGER
The number of columns of the matrix A. If n <= 1, an immediate return is effected.
C, S (input) DOUBLE PRECISION arrays, dimension (M-1) if SIDE = 'L' (N-1) if SIDE = 'R' c(k) and s(k) contain the cosine and
sine that define the matrix P(k). The two by two plane rotation part of the matrix P(k), R(k), is assumed to be of the form R( k )
= ( c( k ) s( k ) ). ( -s( k ) c( k ) )
A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
The m by n matrix A. On exit, A is overwritten by P*A if SIDE = 'R' or by A*P' if SIDE = 'L'.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,M).
LAPACK version 3.0 15 June 2000 DLASR(l)