Sponsored Content
Top Forums Shell Programming and Scripting Setting array equal to command response Post 302216516 by pattywac on Saturday 19th of July 2008 06:48:45 PM
Old 07-19-2008
Setting array equal to command response

normally when i type:
condor_q | tail -1
command line returns:
0 jobs; 0 idle, 0 running, 0 held

I want use the number in front of 'running' in a series of equality tests to submit more jobs when my queue gets low. Someone showed me how to do it a few days ago by setting an array equal to the command. I thought it was:

#!/bin/csh
#
set qu = ( condor_q | tail -1 )


But this is not working..... any ideas?
 

10 More Discussions You Might Find Interesting

1. Programming

equal command for gotoxy() in uinx

hello i am new user to this site. i want to know about equal command for gotoxy() which is used in dos operating system and also equal hedder file for conio.h? please give me responce to me if anybudy know about that. (5 Replies)
Discussion started by: g_s_r_c
5 Replies

2. UNIX for Advanced & Expert Users

Command to list Files less than or equal to 2k size

Hi, *.xml files stored on date wise folders. I need to extract *.xml files from all the folders. File size is lessthan or equal to 2K. Please let me know command or some shell program to due this job on linux m/c This is urgent, Thanks in advance - Bache Gowda (3 Replies)
Discussion started by: bache_gowda
3 Replies

3. Shell Programming and Scripting

Setting values in an array? Easy one

I need to do something like this: KEYS= for key in $KEYS do echo $key done The KEYS are static values in my script, I'm just having trouble with setting them as separate values. Thanks! (3 Replies)
Discussion started by: TheCrunge
3 Replies

4. UNIX for Dummies Questions & Answers

Help - Setting variables equal to data from another file

Relatively new poster but long time reader. I tried searching all threads for similar situations with mine but I've had no luck with some of the solutions. I have a script (script.ksh) that is getting information from an Oracle DB and spooling it into a text file (log.txt). I would then like... (1 Reply)
Discussion started by: Crios121
1 Replies

5. Shell Programming and Scripting

dynamically setting an array

Hi Gurus, How do I dynamically set up an array. Below is my code if ] then set ecomm_task_limit = '${ecomm_srvr}' fi Here, I want to set values in the array "${ecomm_srvr}" into ecomm_task_limit upon each iteration. Finally I want to display all the values in the new array... (4 Replies)
Discussion started by: ragha81
4 Replies

6. UNIX for Dummies Questions & Answers

'less' command response is garbled

Helo , I m using RHEL 4. If I run 'ls -laF | more', response is properly display. but when I run If I run 'ls -laF | less', the response is garbled what to do to remove this? Regards, Amit (4 Replies)
Discussion started by: amitpansuria
4 Replies

7. Shell Programming and Scripting

scp command and no response

I should trasfer some files by xxx.xxx.xxx.xxx to local host. In order to check the function works i tried to transfer a single file and I typed: scp -P 21 username@xxx.xxx.xxx.xxx:/filename.nas /filename.nas At this point i haven't response anch i have to type CTRL+C to return to... (2 Replies)
Discussion started by: andreac81
2 Replies

8. HP-UX

max limit in in setting array

hi, iam getting error when i assign a variable to an array of more that 315 character in length set -A array <variable> <variable> value is 000001 000002 and up to 000045 it is giving error as "The specified subscript cannot be greater than 1024." can any one help me to solve this (2 Replies)
Discussion started by: gomathi
2 Replies

9. Shell Programming and Scripting

perl, put one array into many array when field is equal to sth

Hi Everyone, #!/usr/bin/perl use strict; use warnings; my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d"); would like to split the @test array into two array: @test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d"); means search for 3rd filed. Thanks find the... (0 Replies)
Discussion started by: jimmy_y
0 Replies

10. Shell Programming and Scripting

awk - setting fs to equal any single character

Hi Does anyone know how to set any character as the field separator with awk/nawk on a solaris 10 box. I have tried using /./ regex but this doesnt work either and im out of ideas. thanks (7 Replies)
Discussion started by: chronics
7 Replies
queuedefs(4)							   File Formats 						      queuedefs(4)

NAME
queuedefs - queue description file for at, batch, and cron SYNOPSIS
/etc/cron.d/queuedefs DESCRIPTION
The queuedefs file describes the characteristics of the queues managed by cron(1M). Each non-comment line in this file describes one queue. The format of the lines are as follows: q.[njobj][nicen][nwaitw] The fields in this line are: q The name of the queue. a is the default queue for jobs started by at(1); b is the default queue for jobs started by batch (see at(1)); c is the default queue for jobs run from a crontab(1) file. njob The maximum number of jobs that can be run simultaneously in that queue; if more than njob jobs are ready to run, only the first njob jobs will be run, and the others will be run as jobs that are currently running terminate. The default value is 100. nice The nice(1) value to give to all jobs in that queue that are not run with a user ID of super-user. The default value is 2. nwait The number of seconds to wait before rescheduling a job that was deferred because more than njob jobs were running in that job's queue, or because the system-wide limit of jobs executing has been reached. The default value is 60. Lines beginning with # are comments, and are ignored. EXAMPLES
Example 1: A sample file. # # a.4j1n b.2j2n90w This file specifies that the a queue, for at jobs, can have up to 4 jobs running simultaneously; those jobs will be run with a nice value of 1. As no nwait value was given, if a job cannot be run because too many other jobs are running cron will wait 60 seconds before trying again to run it. The b queue, for batch(1) jobs, can have up to 2 jobs running simultaneously; those jobs will be run with a nice(1) value of 2. If a job cannot be run because too many other jobs are running, cron(1M) will wait 90 seconds before trying again to run it. All other queues can have up to 100 jobs running simultaneously; they will be run with a nice value of 2, and if a job cannot be run because too many other jobs are running cron will wait 60 seconds before trying again to run it. FILES
/etc/cron.d/queuedefs queue description file for at, batch, and cron. SEE ALSO
at(1), crontab(1), nice(1), cron(1M) SunOS 5.10 1 Mar 1994 queuedefs(4)
All times are GMT -4. The time now is 01:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy