Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unable to understand associative nature of awk arrays Post 302092207 by nervous on Saturday 7th of October 2006 06:03:50 AM
Old 10-07-2006
Shereenmotor, Thanks a lot for your detailed reply.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

are Associative Arrays possible in UNIX?

Is it possible to say.. myArr=34 myArr=15 ? (11 Replies)
Discussion started by: yongho
11 Replies

2. UNIX for Dummies Questions & Answers

unable to understand a awk code

i am not able to understand the following code for awk: $awk -F"|" '{ kount++} >END { for (desig in kount) > print desig,kount }' emp.list the input file i.e. emp.list is :: 3432| p.k.agrwal |g.m |sales 4566|g.l.sharma |director|production 3433|r shah | g.m | production... (1 Reply)
Discussion started by: streetfi8er
1 Replies

3. Shell Programming and Scripting

Associative arrays

Hi all, #!/usr/dt/bin/dtksh typeset -A wavelength wavelength=650 wavelength=590 wavelength=510 wavelength=475 wavelength=445 wavelength=400 I have created an associative array like the one above. Now I am trying to print the values If i give print ${wavelength} it is... (4 Replies)
Discussion started by: prasperl
4 Replies

4. Shell Programming and Scripting

associative arrays?

Hello, i'm writing a little script that checks a .txt file for a specific ID that came after 9:10 am which outputs it's data to a file LateUsers.txt once done , it should mention the following: Number of late users Number of unique late users Over all late users percentage number of... (0 Replies)
Discussion started by: rollyah
0 Replies

5. UNIX for Dummies Questions & Answers

Unable to understand ps output.

I m executing ps command and sorting it according to memory usage. Please find the output of the command. # ps aux --sort pmem USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 2060 624 ? Ss 01:54 0:00 init root 2 0.0... (1 Reply)
Discussion started by: pinga123
1 Replies

6. UNIX for Dummies Questions & Answers

Using associative arrays with an if statement

I have this piece of code. The first if statement is not working, however the second if statement is working fine. I have set a value for Srcs to be file.srcs and want to print it. If no value for Rcvs is set, I get the print statement correctly hasValue="file.srcs" if ${hasValue}; then ... (0 Replies)
Discussion started by: kristinu
0 Replies

7. Shell Programming and Scripting

Improving code by using associative arrays

I have the following code, and I am changing it to #!/bin/bash hasArgumentCModInfile=0 hasArgumentSrcsInfile=0 hasArgumentRcvsInfile=0 OLDIFS="$IFS" IFS="|=" # IFS controls splitting. Split on "|" and "=", not whitespace. set -- $* # Set the positional... (3 Replies)
Discussion started by: kristinu
3 Replies

8. Solaris

Cant understand the File system working nature

Hi, We have a filesystem whose usage has gone above 81%, i tried to zip some files in the sub directories but the space is not released in the main file system. > df -h Filesystem size used avail capacity Mounted on /u01/app 5.8G 4.6G 1.2G 81% ... (2 Replies)
Discussion started by: nokiak810
2 Replies

9. UNIX for Dummies Questions & Answers

Unable to understand awk script.

Hi below is the samll awk script which i am not able to understand properly. here a bit confusion in 2nd line for me 1. why *\ is not used before . in second line as it was used in first line *\$*\. */ 2. why always \ is used in every first line 3. is there any specific meaning... (9 Replies)
Discussion started by: scriptor
9 Replies

10. Shell Programming and Scripting

Associative arrays awk

Hi, I have the following dataset. A 2 1 272 A 2 2 333 A 2 3 222 A 3 1 222 A 3 2 11 B 1 1 112 B 1 2 998 B 2 1 667 C 1 1 887 C 1 2 887 C 2 1 998 I need to have an associate array based on the first column and generate a auto generated number column in the last column. Needed output:... (2 Replies)
Discussion started by: mitt
2 Replies
__gnu_pbds(3cxx)														  __gnu_pbds(3cxx)

NAME
__gnu_pbds - SYNOPSIS
Classes struct associative_container_tag Basic associative-container. class basic_hash_table An abstract basic hash-based associative container. struct basic_hash_tag Basic hash. class basic_tree An abstract basic tree-like (tree, trie) associative container. struct basic_tree_tag Basic tree. struct binary_heap_tag Binary-heap (array-based). struct binomial_heap_tag Binomial-heap. class cc_hash_table A concrete collision-chaining hash-based associative container. struct cc_hash_tag Collision-chaining hash. class container_base An abstract basic associative container. struct container_tag Base data structure tag. struct container_traits container_traits class gp_hash_table A concrete general-probing hash-based associative container. struct gp_hash_tag General-probing hash. class list_update A list-update based associative container. struct list_update_tag List-update. struct null_mapped_type A mapped-policy indicating that an associative container is a set. struct ov_tree_tag Ordered-vector tree. struct pairing_heap_tag Pairing-heap. struct pat_trie_tag PATRICIA trie. struct priority_queue_tag Basic priority-queue. struct rb_tree_tag Red-black tree. struct rc_binomial_heap_tag Redundant-counter binomial-heap. struct sequence_tag Basic sequence. struct splay_tree_tag Splay tree. struct string_tag Basic string container, inclusive of strings, ropes, etc. struct thin_heap_tag Thin heap. class tree A concrete basic tree-based associative container. struct tree_tag tree. class trie A concrete basic trie-based associative container. struct trie_tag trie. Typedefs typedef void trivial_iterator_difference_type Functions void __throw_container_error (void) void __throw_insert_error (void) void __throw_join_error (void) void __throw_resize_error (void) Detailed Description GNU extensions for policy-based data structures for public use. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 __gnu_pbds(3cxx)
All times are GMT -4. The time now is 11:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy