Sponsored Content
Top Forums Shell Programming and Scripting arrays and while loops in bash Post 302258693 by npatwardhan on Saturday 15th of November 2008 11:30:45 AM
Old 11-15-2008
ok thanks that worked!!
so you dont use $ while assigning a variable with a value but use it on the rhs? sorry i am new to scripting..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

korn shell "loops & arrays"

Hi, I am trying to write a script which will loop until a certain action has been performed. I have two files i would like to compares. For example: file1 has a list of user ids (about 900) from the company's e-mail server. file2 has a list of user ids (about 50 or so) from... (7 Replies)
Discussion started by: muzica
7 Replies

2. Shell Programming and Scripting

trying to learn for loops, and arrays at the same time

Ok, I've already completed the task this is for, but now I'm trying to go back and find more eloquent solutions for future reference. I have a report I've generated that is formatted like this: 1033 1 1079 4 1453 5 2205 6 1933 7 461 8 646 9 1655 12 975 13 1289 14 The first number is... (3 Replies)
Discussion started by: DeCoTwc
3 Replies

3. Homework & Coursework Questions

Bash if and loops help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Your shell script should continue to execute until the user selects option 4 2. Relevant commands, code,... (2 Replies)
Discussion started by: boyboy1212
2 Replies

4. Shell Programming and Scripting

while loops and variables under bash

Hi, This is probably going to be very simple but i came across something i can't quite explain. Here is the situation: i have a list of files, which i'd like to process one by one (get the size, make some tests, whatever) and generate some statistics using different variables. Something... (5 Replies)
Discussion started by: m69w
5 Replies

5. Shell Programming and Scripting

Using arrays in bash using strings to bash built-in true

I have the following code and for some reason when I call the program using /home/tcdata/tatsh/trunk/hstmy/bin/bash/raytrac.bash --cmod=jcdint.cmod I get hasArgument = hasArgument = true Somehow the array element is returning even though I have not chosen the option. ... (41 Replies)
Discussion started by: kristinu
41 Replies

6. Shell Programming and Scripting

bash loops

hello i'm writing a script and I want to use a for loop inside a while loop as following: while read line; do echo $line for i in $vrm; do echo $i done done < './contacts' when i use just the while loop it prints the lines from file ./contacts just... (13 Replies)
Discussion started by: vlm
13 Replies

7. UNIX for Dummies Questions & Answers

Dealing with Double Loops, Arrays and GREP

Can someone please help me to learn how to deal with loops, arrays and grep? I have two arrays (lets say I and j) each in a separate file And have file with lines of data I need to extract, such as Ruby Smith: some text here Ruby Smith: some other text here Ruby Brown: some text here Ruby... (10 Replies)
Discussion started by: A-V
10 Replies

8. Shell Programming and Scripting

Pipe 2 bash loops together

What is the proper way to run two bash loops in the same command? The two below loops run separately, the problem is when I pipe them I get an error that the file used for the second loop does not exist. I am not sure how to wait for the first loop to complete and then start the second. Thank... (10 Replies)
Discussion started by: cmccabe
10 Replies

9. Shell Programming and Scripting

Correlation Between 3 Different Loops using Bash

I have 3 loops that I use to determine the permission level of AWS user accounts. This array lists the AWS policy ARN (Amazon Resource Name): for ((policy_index=0;policy_index<${#aws_managed_policies};++policy_index)); do aws_policy_arn="${aws_managed_policies}" ... (1 Reply)
Discussion started by: bluethundr
1 Replies

10. Shell Programming and Scripting

For i in loops on 2 arrays

Hey , i have this script and i have these loops so it can find a match between 2 arrays : ARRAY_1=(one two three) ARRAY_2=(A B C) VAR='B' for NUMBERS in "${ARRAY_1}" do for LETTERS in "${ARRAY_2}" do if ];then VAR='LETTERS' ... (2 Replies)
Discussion started by: batchenr
2 Replies
KUMOSTAT(1)						      General Commands Manual						       KUMOSTAT(1)

NAME
kumostat - get kumofs status SYNOPSIS
kumostat server-address[:port=19800] command kumostat -m manager-address[:port=19700] command DESCRIPTION
Get status from Server node. COMMANDS
pid get pid of server process uptime get uptime time get UNIX time version get version cmd_get get total number of processed get requests cmd_set get total number of processed set requests cmd_delete get total number of processed delete requests items get number of stored items rhs get rhs (routing table for Get) whs get whs (routing table for Set/Delete) hscheck check if rhs == whs set_delay maximize throughput at the expense of latency unset_delay maximize throughput at the expense of latency DELAY MODE
If the delay mode is enabled, req/sec throughput is maximized at the expense of latency. This mode actually disables TCP_NODELAY option of all sockets. The practice of this feature is as following: - run some scripts that watches load of the kumo-server. (see source code of kumotop) - if the load of kumo-server becomes high, enable delay mode by kumostat set_delay command. - if the load of kumo-server becomes low, disable delay mode by kumostat unset_delay command. EXAMPLE
$ kumostat svr1 items $ kumotop -m mgr1 hscheck SEE ALSO
kumo-server(1). kumostat July 2009 KUMOSTAT(1)
All times are GMT -4. The time now is 01:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy