accesing a value


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting accesing a value
# 1  
Old 05-21-2008
Java accesing a value

hi

while [ $count -lt $var ]
do
if [ $count = 0 ]
then
echo QManager Name $1
fi
if [ $count = 1 ]
then
echo Cluster Name$2
fi
if (( $count != 0 && $count != 1 ))
then
echo Queue Name `$($count)`
fi

count=`expr $count + 1`
done

when i run this i am getting an error
command not found Queue Name

please help
# 2  
Old 05-21-2008
change this line

Code:
echo Queue Name `$($count)`

to

Code:
echo "Queue Name $count"

it is better to use double quote with echo when u have more than 1 wards to echo
# 3  
Old 05-21-2008
Java accesing a value

hi
in the u sent it is printing $count
but i want like 3rd or 4th argument like that
# 4  
Old 05-21-2008
can u pls tell how u want output.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Programming

Accesing structure member:Error:dereferencing pointer to incomplete type

$ gcc -Wall -Werror struct.c struct.c: In function `main': struct.c:18: error: dereferencing pointer to incomplete type $ cat struct.c #include <stdio.h> #include <stdlib.h> #include <string.h> /*Declaration of structure*/ struct human { char *first; char gender; int age; } man,... (3 Replies)
Discussion started by: amit4g
3 Replies

2. Shell Programming and Scripting

Finding users currently accesing a directory

Is there any command/script to find a list of all users accessing a particular directory (from all machines on the network??) (3 Replies)
Discussion started by: mehtad
3 Replies
Login or Register to Ask a Question