02-12-2008
Cannot create and declare an array and substitute the values in bash shell
Sir i m unable to do .. above mentioned in a script ..
It shooting same old error.
ara.sh: declare: not found
ara.sh: syntax error at line 3: `(' unexpected
ara.sh is
declare -a bull[10]
for (( i=1; i < 10; i++ ))
do
bull[$i]=$i
echo "${bull[$i]}"
done
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all...
I am executing a comman in a shell script but the command needs a user input of character 'y' as input so it stops in between...may i know is there is any way of giving that character as input in the shell script itself???...thanks in advance.... (6 Replies)
Discussion started by: santy
6 Replies
2. Shell Programming and Scripting
I am just stucked in syntax.This is more like a array and for loop problem.
I want to use ls -l command and get filezise and filename of all filenames in the directory in an array (say array#1).
After 2 minutes of sleep, i want to get the same information in another array (say array#2).
The... (4 Replies)
Discussion started by: 33junaid
4 Replies
3. Shell Programming and Scripting
Hi,
I want to send input to promt from shell script, this thing is possible.
I give the one command
`/usr/share/ssl/misc/CA -newreq`
it needs some user input like password etc., but i need this input also from shell script but it does not works.
`/usr/share/ssl/misc/CA -newreq` <<EOF... (2 Replies)
Discussion started by: Vaibhav Agarwal
2 Replies
4. Shell Programming and Scripting
As per title and much apprecieated! (2 Replies)
Discussion started by: biglau
2 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I would like to declare a vector of variables and access them sequentially.
Here is my code
ARRAY_CT="0001000000 0000100000 0000010000"
ELEMENTS_CT=${#ARRAY_CT}
echo $ELEMENTS_CT
for (( j=1;j<=$ELEMENTS_IS;j++)); do
echo ${ARRAY_IS}
done
... (2 Replies)
Discussion started by: f_o_555
2 Replies
6. Shell Programming and Scripting
Hello,
I am running a post script in autoyast where I am trying to set the broadcast and network address.
I have the ip address and netmask already (reading from a file)..
I saw the post from fpmurphy but it is using ksh which isn't an option in autoyast.
Thanks in advance! (3 Replies)
Discussion started by: bloodclot
3 Replies
7. Shell Programming and Scripting
this is my code
declare -a USERCERT
declare -a CACERT
declare -a KEYSRC
this is the error
+ declare -a USERCERT
./clone.sh: 1: declare: not found
+ declare -a CACERT
./clone.sh: 1: declare: not found
+ declare -a KEYSRC
./clone.sh: 1: declare: not found (11 Replies)
Discussion started by: xerox
11 Replies
8. UNIX for Dummies Questions & Answers
Got struck while trying to write a shell script which should automatically give input.
While running a script for eg: (adpatch.sh)
It Prompts for Multiple inputs like:
Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP ? need to give... (2 Replies)
Discussion started by: abdmoha
2 Replies
9. Shell Programming and Scripting
hi,
how can i pass a password automatically when a shell script is running.
i have shell script(runscript.sh) which call another shell script inside it as a different user.
runscript.sh contains
su - nemo -c "/bin/main_script.sh"
but when i execute "runscript.sh" it try to run... (7 Replies)
Discussion started by: Little
7 Replies
10. Shell Programming and Scripting
Hi,
Have assigned values in Array and iterating in while loop and would require values outside of the loop. But its returning NULL.
could you please help us how to define Global array declaration in Unix shell scripting?
i am using Kron shell.
Thanks in advance. (2 Replies)
Discussion started by: periyasamycse
2 Replies
LEARN ABOUT CENTOS
rpcdebug
rpcdebug(8) System Manager's Manual rpcdebug(8)
NAME
rpcdebug - set and clear NFS and RPC kernel debug flags
SYNOPSIS
rpcdebug -vh
rpcdebug -m module
rpcdebug -m module -s flags...
rpcdebug -m module -c flags...
DESCRIPTION
The rpcdebug command allows an administrator to set and clear the Linux kernel's NFS client and server debug flags. Setting these flags
causes the kernel to emit messages to the system log in response to NFS activity; this is typically useful when debugging NFS problems.
The first form in the synopsis can be used to list all available debug flags. The second form shows the currently set debug flags for the
given module. The third form sets one or more flags, and the fourth form clears one or more flags.
The value all may be used to set or clear all the flags for the given module.
OPTIONS
-c Clear the given debug flags.
-h Print a help message and exit. When combined with the -v option, also prints the available debug flags.
-m module
Specify which module's flags to set or clear. Available modules are:
nfsd The NFS server.
nfs The NFS client.
nlm The Network Lock Manager, in either an NFS client or server.
rpc The Remote Procedure Call module, in either an NFS client or server.
-s Set the given debug flags.
-v Increase the verbosity of rpcdebug's output.
FILES
/proc/sys/sunrpc/{rpc,nfs,nfsd,nlm}_debug
procfs-based interface to kernel debug flags.
SEE ALSO
rpc.nfsd(8), nfs(5), syslogd(8).
BUGS
Bugs can be found or reported at http://nfs.sf.net/.
AUTHOR
Program by Olaf Kirch <okir@suse.de> and <frederic.jolly@bull.ext.net>. Manpage by Greg Banks <gnb@melbourne.sgi.com>.
5 Jul 2006 rpcdebug(8)