Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to set a variable with a count variable i.e. VARIABLE$COUNT Post 302449086 by Bashingaway on Saturday 28th of August 2010 09:37:31 AM
Old 08-28-2010
Quote:
Originally Posted by jim mcnamara
I think you want to use arrays:

Arrays
I'd already read that section but you can't put a variable in the array field either....

i.e.

$1STCHECK[$f] doesn't work
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

select count(*) into a variable

Hi, Could anybody help me how can I assign the value of "select count(*) from table1" to a variable in an unix shell script. Thanks. (4 Replies)
Discussion started by: nguda
4 Replies

2. Shell Programming and Scripting

setting file count to a variable

Hey guys. My goal here is to count the number of .dat files in in a directory(28 files). If 28 files exist I am ok. Having trouble doing this. Any help would b e greatly appreciated. #!/usr/bin/ksh #============================================================================= ### Define local... (3 Replies)
Discussion started by: ecupirate1998
3 Replies

3. Shell Programming and Scripting

Storing count(*) into unix variable

Hi, I've just started on unix shell scripting a few days ago. I tried look for the solution to my problem over the net but to no avail. The objective of my script is to count the number of records in a particular table from a Oracle database. Ok, here's my problem, when I run this script: ... (1 Reply)
Discussion started by: mervinboyz
1 Replies

4. Shell Programming and Scripting

Dynamic Variable Based on Count

I'm trying to assign variables that include the current value of a count, but I can't seem to get it working... this script is incomplete, but some guidance on how to use a dynamic variable would be helpful: Sample Input: bash-2.03$ more sg2.txt Results for group6 443 1394 Results for... (3 Replies)
Discussion started by: earnstaf
3 Replies

5. Shell Programming and Scripting

count of a string within a variable

I am writing ksh to check for duplicate records in two different set of tables on oracle database, to get this i am running two plsql qurries at a time through the ksh, so the output of the qurries will be stored in variable say "SQL_STRING". So now to say if duplicate records exists in table or... (3 Replies)
Discussion started by: vpv0002
3 Replies

6. Shell Programming and Scripting

To count a string with in a variable

I am writing a ksh to check for duplicate records in two different set of tables on oracle database, to get this i am running two plsql qurries at a time through the ksh, so the output of the qurries will be stored in variable say "SQL_STRING". So now to say if duplicate records exists in table or... (6 Replies)
Discussion started by: vpv0002
6 Replies

7. Shell Programming and Scripting

count lines in file to variable

I have a text file in which you need to identify the number of lines that looks like this: awk '{x + +} END {print x}' filename The problem is that I do not know how this data to any variable in which then need to continue to work in a cycle for .. do not know someone help? Sorry for my... (4 Replies)
Discussion started by: gizmo16
4 Replies

8. Shell Programming and Scripting

[Solved] Count characters of variable from right

My variable is something like: f="/Volumes/VERVE/MOOTON_CALL/01_shots/XX/xx0195/Projects/program/rs0195_v400001.aep" I use ${f:63:6} to call "rs0195" as characters counted from the left, but it'd be so much easier to count from the right. If ${f:95:10} counts from the left, what would... (2 Replies)
Discussion started by: scribling
2 Replies

9. Shell Programming and Scripting

Getting file count in a variable

Hi All I am checking for the presence of certain no of files in a directory. Only if the required no of files are present should I continue with my processing. For e.g. in the temp directory below, there are 4 files of the format sample_aa(bb)(cc)(dd)_test. I need to check the count of these... (17 Replies)
Discussion started by: swasid
17 Replies

10. Shell Programming and Scripting

awk variable search and line count between variable-search pattern

Input: |Running the Rsync|Sun Oct 16 22:48:01 BST 2016 |End of the Rsync|Sun Oct 16 22:49:54 BST 2016 |Running the Rsync|Sun Oct 16 22:54:01 BST 2016 |End of the Rsync|Sun Oct 16 22:55:45 BST 2016 |Running the Rsync|Sun Oct 16 23:00:02 BST 2016 |End of the Rsync|Sun Oct 16 23:01:44 BST 2016... (4 Replies)
Discussion started by: busyboy
4 Replies
ldns(3) 						     Library Functions Manual							   ldns(3)

NAME
ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok SYNOPSIS
#include <stdint.h> #include <stdbool.h> #include <ldns/ldns.h> size_t ldns_buffer_remaining_at(ldns_buffer *buffer, size_t at); size_t ldns_buffer_remaining(ldns_buffer *buffer); int ldns_buffer_available_at(ldns_buffer *buffer, size_t at, size_t count); int ldns_buffer_available(ldns_buffer *buffer, size_t count); ldns_status ldns_buffer_status(ldns_buffer *buffer); bool ldns_buffer_status_ok(ldns_buffer *buffer); DESCRIPTION
ldns_buffer_remaining_at() returns the number of bytes remaining between the indicated position and the limit. buffer: the buffer at: indicated position Returns number of bytes ldns_buffer_remaining() returns the number of bytes remaining between the buffer's position and limit. buffer: the buffer Returns the number of bytes ldns_buffer_available_at() checks if the buffer has at least COUNT more bytes available. Before reading or writing the caller needs to ensure enough space is available! buffer: the buffer at: indicated position count: how much is available Returns true or false (as int?) ldns_buffer_available() checks if the buffer has count bytes available at the current position buffer: the buffer count: how much is available Returns true or false (as int?) ldns_buffer_status() returns the status of the buffer param[in] buffer Returns the status ldns_buffer_status_ok() returns true if the status of the buffer is LDNS_STATUS_OK, false otherwise buffer: the buffer Returns true or false AUTHOR
The ldns team at NLnet Labs. Which consists out of Jelte Jansen and Miek Gieben. REPORTING BUGS
Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html COPYRIGHT
Copyright (c) 2004 - 2006 NLnet Labs. Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
ldns_buffer. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. REMARKS
This manpage was automaticly generated from the ldns source code by use of Doxygen and some perl. 30 May 2006 ldns(3)
All times are GMT -4. The time now is 03:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy