Sponsored Content
Operating Systems Solaris i cannot give array declaration in shell script Post 302166544 by naree on Tuesday 12th of February 2008 06:04:41 AM
Old 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

how to give a variable to a command in shell script...

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

Array Declaration and For Loop

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

Can give the input to prompt using shell script

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

Could someone give me an example of awk accessing array defined in Korn Shell?

As per title and much apprecieated! (2 Replies)
Discussion started by: biglau
2 Replies

5. UNIX for Dummies Questions & Answers

Array declaration problem

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

Shell script to give broadcast and network address

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

Array declaration in Shell script

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

How to give multiple inputs to a shell script

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

How to give password at run time in a shell script?

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

Global declaration of Array in Shell

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
gm_profile(1grass)						Grass User's Manual						gm_profile(1grass)

NAME
gm_profile - PROFILE TOOL (gis.m) PROFILE TOOL (gis.m) PROFILE TOOL (gis.m) The Profile Tool will draw a 2-dimensional profile of the surface of any raster map. The profile will be calculated along a transect line, drawn with a mouse on a map display. The transect line can be a simple line (i.e., with only a beginning and ending node) or a complex polyline (i.e., with multiple segments, delineated by multiple nodes). Using the Profile Tool The Profile Tool is started by clicking on the profile button () on the toolbar of a map display window. 1 Click the map button on the Profile Tool toolbar to select a raster map to profile. The map to profile can be different from the one displayed. 2 Click the transect button to begin drawing a transect to profile with a mouse the current map display (i.e., the map display from which you launched the Profile Tool). Draw by holding down the left button to make a "rubber-band" line for each segment of the transect. A transect can have a single, straight segment or multiple segment. There is no need to "end" the drawing. The Profile Tool will profile the drawn transect at any time. You can also extend an existing transect and draw a profile of the new transect. 3 Click the profile button to create the profile. The profile extends from left to right in the profile display. The horizontal (x-axis) scale represents the total distance along the tran- sect to be profiled. Vertical lines mark each node on a multi-segment transect and show the total distance along the transect to the node. The vertical (y-axis) scale is in units of the map that is being profiled. All scaling and axis labels are created automatically, and can- not be changed by the user. &bull; The erase button will erase the current transect and profile. &bull; The save button will save the profile to an Encapsulated PostScript (.eps) file. SEE ALSO
gis.m manual gis.m: ANIMATION TOOL gis.m: GEORECTIFY TOOL d.profile d.geodesic d.rhumbline m.cogo r.profile r.transect AUTHORS
Michael Barton, Arizona State University, Tempe, Arizona, USA Hamish Bowman, University of Otago, Dunedin, New Zealand Last changed: $Date: 2009-09-12 17:51:39 +0200 (Sat, 12 Sep 2009) $ Full index GRASS 6.4.2 gm_profile(1grass)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy