Login or Register to Ask a Question and Join Our Community

How to declare an array to take more than 10,000 characters

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to declare an array to take more than 10,000 characters
# 1  
Old 01-15-2008
Data How to declare an array to take more than 10,000 characters

Hi Guys
Need some help

I am reading the string values from the text files into the shell script and had them feed into array
I have declared an associative array as
TYPE t_user_id_tab IS TABLE OF VARCHAR2(3000);\n
my_user_id t_user_id_tab;\n
varchar2 is limiting me to take only 32760 characters
but I have a text files which has more than 1100 users with length of each user id is 8
1100* 8 = 8800 + the '',sapces

so I am looking around 10,000 characters is there a way that I can declare the array of string to take 10,00 characters

Thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Programming

How to Declare an array of function pointers?

I am attempting to create an array of function pointers. The examples I follow to do this are from: support.microsoft.com/en-us/help/30580/how-to-declare-an-array-of-pointers-to-functions-in-visual-c ... (3 Replies)
Discussion started by: spflanze
3 Replies

2. UNIX for Dummies Questions & Answers

How to declare an array in UNIX and print the elements with tab delimits?

Hello, In a shell script, I want to declare an array and subsequently print the elements with tab delimits. My array has the following structure and arbitrary elements: myArray=('fgh' 'ijk' 'xyz' 'abc'); Next, I would like to print it with a '\n' at the end. Thanks for your input! ... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies

3. Shell Programming and Scripting

create array holding characters from sring then echo array.

Hi, I wish to store $string1 in $string1array a character in each array element. Then i wish to echo the entire array to the screen so that it reads as the normal string again. I have been trying with the code below but does not work. Please help... To put string into array: ... (5 Replies)
Discussion started by: rorey_breaker
5 Replies

4. Shell Programming and Scripting

declare, assign variables using array, counter, loop

using bash Tru64... converting DCL to shell... any tips to make this work would be greatly appreciated. Below is my failed attempt to assign command line input to variables by first declaring an array. I use a counter to create unique variables in a loop through the array. I need to call... (3 Replies)
Discussion started by: egkumpe
3 Replies

5. News, Links, Events and Announcements

Microsoft "Donates" $3,000,000,000 to Feds

Surreal quote from the news link below: http://www.washingtonpost.com/wp-dyn/articles/A44615-2002Nov12.html (0 Replies)
Discussion started by: Neo
0 Replies
Login or Register to Ask a Question
GETOPT(3)								 1								 GETOPT(3)

getopt - Gets options from the command line argument list

array getopt (string $options, [array $longopts]) DESCRIPTION
Parses options passed to the script. PARAMETERS
o $options - Each character in this string will be used as option characters and matched against options passed to the script starting with a single hyphen ( -). For example, an option string "x" recognizes an option -x. Only a-z, A-Z and 0-9 are allowed. o $longopts - An array of options. Each element in this array will be used as option strings and matched against options passed to the script starting with two hyphens ( --). For example, an longopts element "opt" recognizes an option --opt. The $options parameter may contain the following elements: oIndividual characters (do not accept values) oCharacters followed by a colon (parameter requires value) oCharacters followed by two colons (optional value) Option values are the first argument after the string. If a value is required, it does not matter whether the value has leading white space or not. See note. Note Optional values do not accept " " (space) as a separator. Note The format for the $options and $longopts is almost the same, the only difference is that $longopts takes an array of options (where each element is the option) whereas $options takes a string (where each character is the option). RETURN VALUES
This function will return an array of option / argument pairs or FALSE on failure. Note The parsing of options will end at the first non-option found, anything that follows is discarded. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | Added support for "=" as argument/value separa- | | | tor. | | | | | 5.3.0 | | | | | | | Added support for optional values (specified | | | with "::"). | | | | | 5.3.0 | | | | | | | Parameter $longopts is available on all systems. | | | | | 5.3.0 | | | | | | | This function is no longer system dependent, and | | | now works on Windows, too. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 getopt(3) example: The basics <?php // Script example.php $options = getopt("f:hp:"); var_dump($options); ?> shell> php example.php -fvalue -h The above example will output: array(2) { ["f"]=> string(5) "value" ["h"]=> bool(false) } Example #2 getopt(3) example: Introducing long options <?php // Script example.php $shortopts = ""; $shortopts .= "f:"; // Required value $shortopts .= "v::"; // Optional value $shortopts .= "abc"; // These options do not accept values $longopts = array( "required:", // Required value "optional::", // Optional value "option", // No value "opt", // No value ); $options = getopt($shortopts, $longopts); var_dump($options); ?> shell> php example.php -f "value for f" -v -a --required value --optional="optional value" --option The above example will output: array(6) { ["f"]=> string(11) "value for f" ["v"]=> bool(false) ["a"]=> bool(false) ["required"]=> string(5) "value" ["optional"]=> string(14) "optional value" ["option"]=> bool(false) } Example #3 getopt(3) example: Passing multiple options as one <?php // Script example.php $options = getopt("abc"); var_dump($options); ?> shell> php example.php -aaac The above example will output: array(2) { ["a"]=> array(3) { [0]=> bool(false) [1]=> bool(false) [2]=> bool(false) } ["c"]=> bool(false) } SEE ALSO
$argv. PHP Documentation Group GETOPT(3)

Featured Tech Videos