Sponsored Content
Top Forums UNIX for Dummies Questions & Answers create an array of numbers in awk Post 302620585 by lucasvs on Sunday 8th of April 2012 09:44:28 PM
Old 04-08-2012
You're absolutely right !

Thanks agama
 

9 More Discussions You Might Find Interesting

1. 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

2. Solaris

i cannot assign float point numbers to an array in solaris

total=0 declare -a sum limit=`iostat -En | grep -i size | awk '{print $2}' | sed -e 's/GB//g' | wc -l` echo "Limit is equal to $limit" ara="`iostat -En | grep -i size | awk '{print $2}' | sed -e 's/GB//g'`" for (( i=1; i<=$limit; i++ )) do sum=`echo $ara | cut -d " " -f $i` echo ${sum}... (11 Replies)
Discussion started by: naree
11 Replies

3. Solaris

can array store float point numbers

Hi all, I have doubt can array in a shell script can store floating point numbers. i have tired. but i unable to work it out. Please help me regarding this Thank U Naree (1 Reply)
Discussion started by: naree
1 Replies

4. UNIX for Dummies Questions & Answers

Create an array with awk

List, I want to have an array created of a particular item in the following textfile: router> show user Se4/0:29 site1 Sync PPP - Bundle: Di372 Se5/0:29 site2 Sync PPP - Bundle: Di340 router> The array should have 2 entries, site1 and site2 ... (2 Replies)
Discussion started by: philipz
2 Replies

5. Shell Programming and Scripting

Loop assistance, getting array of random numbers and feeding to a command, how-to?

Hi all, I need a little assistance to complete the following script. I would like to take a file with a single number on each line and for each number, run it through a command. The loop will terminate once all numbers have been checked. Here is what I have thus far... COUNTER=`wc -l... (2 Replies)
Discussion started by: boolean2222
2 Replies

6. UNIX for Dummies Questions & Answers

Help with printing sorted array of numbers

Dear All, I am trying to sort an array of numbers to retrieve the mimimum and maximum values of numbers in that array, by printing the first and last elements of the sorted array. My code is @sorted_numbers = sort (@numbers); print "@sorted_numbers\n"; print "$sorted_numbers,... (0 Replies)
Discussion started by: pawannoel
0 Replies

7. Programming

generate array of random numbers

hi guys, I am writing a c program that generates a two dimensional array to make matrix and a vector of random numbers and perform multiplication. I can't figure out whats wrong with my code. It generates a matrix of random numbers but all the numbers in the vector array is same and so is the... (2 Replies)
Discussion started by: saboture88
2 Replies

8. Shell Programming and Scripting

How to create individual entries from a range of numbers?

I want to create entries based on the series as in examples below: Input: 2dat3 grht-5&&-15 3dat3 grht-16&&-30 4dat3 ftht-4&&-12 5sat3 ftht-16&&-20 Output: 2dat3 grht-5 2dat3 grht-6 2dat3 grht-7 2dat3 grht-8 (7 Replies)
Discussion started by: aydj
7 Replies

9. Shell Programming and Scripting

awk to create variables to pass into a bash loop to create a download link

I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies
tttk_Xt_input_handler(library call)									       tttk_Xt_input_handler(library call)

NAME
tttk_Xt_input_handler -- Process ToolTalk events for Xt clients SYNOPSIS
#include <Tt/tttk.h> void tttk_Xt_input_handler( XtPointer procid, int *source, XtInputId *id); DESCRIPTION
If procid is not NULL, tttk_Xt_input_handler passes it to tt_default_procid_set(3). The tttk_Xt_input_handler function then calls tt_mes- sage_receive(3), which retrieves the next message available, if any, for the default procid. If tt_message_receive(3) returns TT_ERR_NOMP, then tttk_Xt_input_handler closes the default procid with ttdt_close(3), and removes the input source *id with XtRemoveInput(3) if id is not zero. If a message is available and tt_message_receive(3) returns it (indicating it was not consumed by any message or pattern call- back), then the ToolTalk service passes the message to tttk_message_abandon(3). RETURN VALUE
The tttk_Xt_input_handler function returns no value. APPLICATION USAGE
The application should use tttk_Xt_input_handler as its Xt input handler unless some messages are expected not to be consumed by callbacks. (The only messages that absolutely cannot be intercepted and consumed by callbacks are those that match observe signatures in a ptype or otype.) EXAMPLES
int myTtFd; char *myProcID; myProcID = ttdt_open(&myTtFd, "WhizzyCalc", "Acme", "1.0", 1); /* ... */ /* Process the message that started us, if any */ tttk_Xt_input_handler(myProcID, 0, 0); /* ... */ XtAppAddInput(myContext, myTtFd, (XtPointer)XtInputReadMask, tttk_Xt_input_handler, myProcID); SEE ALSO
Tt/tttk.h - Tttttk(5), ttdt_close(3), tttk_message_abandon(3), tt_default_procid_set(3), tt_message_receive(3), XtAppAddInput(3), XtRemoveInput(3). tttk_Xt_input_handler(library call)
All times are GMT -4. The time now is 05:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy