How to check index of a array element in shell script?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to check index of a array element in shell script?
# 8  
Old 05-24-2010
Thanks all it worked.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk: check element in array and it's value

Hello, I want to see if element exists in array, if so then, check it's corresponding value. Column 4 is position and column 1 is the chromosome for it. There are duplicates for one position on one chromosome. I want to check if same position exists on different chromosome: Data... (8 Replies)
Discussion started by: genome
8 Replies

2. Shell Programming and Scripting

Associative array index question

I am trying to assign indexes to an associative array in a for loop but I have to use an eval command to make it work, this doesn't seem correct I don't have to do this with regular arrays For example, the following assignment fails without the eval command: #! /bin/bash read -d "\0" -a... (19 Replies)
Discussion started by: Riker1204
19 Replies

3. UNIX for Advanced & Expert Users

Array Element

This question is for someone that's more familiar with Array Element. I need to know if the maximum array element that can be assigned is 1024 and if its so, Is there a workaround solution when the counter exceeded 1024? param_array="$param_nam" counter=$counter+1 #to avoid space... (3 Replies)
Discussion started by: cumeh1624
3 Replies

4. Shell Programming and Scripting

awk Search Array Element Return Index

Can you search AWK array elements and return each index value for that element. For example an array named car would have index make and element engine. I want to return all makes with engine size 1.6. Array woulld look like this: BMW 1.6 BMW 2.0 BMW 2.5 AUDI 1.8 AUDI 1.6 ... (11 Replies)
Discussion started by: u20sr
11 Replies

5. Shell Programming and Scripting

Perl: How to check whether my array contains element x

Hi All, I am new to perl I am stuck in simple problem I need your help I want to define a subroutine. sub check_if_entity_exists(@array_to_be_checked,$entityName) I have array as http-listener-1 http-listener-2 http-listener-3 http-listener-4 If i send http-listener-3 my... (1 Reply)
Discussion started by: javaholics
1 Replies

6. Shell Programming and Scripting

Help! Yet another check element in array Question

Greetings, DISCLAIMER: My shell scripting is rusty so my question may be borderline stupid. You've been warned. I need to create a script that a) lists the content of zip files in a directory and b) sends out an `exception` report. My ZIP files contain a control file (for load check). I want... (2 Replies)
Discussion started by: alan
2 Replies

7. Shell Programming and Scripting

awk array index help

$ cat file.txt A|X|20 A|Y|20 A|X|30 A|Z|20 B|X|10 A|Y|40 Summing up $NF based on first 2 fields, $ awk -F "|" 'BEGIN {OFS="|"} { sum += $NF } END { for (f in sum) print f,sum } ' file.txt o/p: A|X|50 A|Y|60 A|Z|20 (4 Replies)
Discussion started by: uwork72
4 Replies

8. UNIX for Dummies Questions & Answers

wh inode index starts from 1 unlike array index (0)

brothers why inode index starts from 1 unlike array inex which starts from 0 its a question from the design of unix operating system of maurice j.bach i need to know the answer urgently...someone help please (1 Reply)
Discussion started by: sairamdevotee
1 Replies

9. Filesystems, Disks and Memory

why the inode index of file system starts from 1 unlike array index(0)

why do inode indices starts from 1 unlike array indexes which starts from 0 its a question from "the design of unix operating system" of maurice j bach id be glad if i get to know the answer quickly :) (0 Replies)
Discussion started by: sairamdevotee
0 Replies

10. Shell Programming and Scripting

Using Awk in shell script to extract an index of a substring from a parent string

Hi All, I am new to this shell scripting world. Struck up with a problem, can anyone of you please pull me out of this. Requirement : Need to get the index of a substring from a parent string Eg : index("Sandy","dy") should return 4 or 3. My Approach : I used Awk function index to... (2 Replies)
Discussion started by: sandeepms17
2 Replies
Login or Register to Ask a Question
DateTime::Locale::af_ZA(3)				User Contributed Perl Documentation				DateTime::Locale::af_ZA(3)

NAME
DateTime::Locale::af_ZA SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'af_ZA' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Afrikaans South Africa. DATA
This locale inherits from the DateTime::Locale::af locale. It contains the following data. Days Wide (format) Maandag Dinsdag Woensdag Donderdag Vrydag Saterdag Sondag Abbreviated (format) Ma Di Wo Do Vr Sa So Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) Maandag Dinsdag Woensdag Donderdag Vrydag Saterdag Sondag Abbreviated (stand-alone) Ma Di Wo Do Vr Sa So Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) Januarie Februarie Maart April Mei Junie Julie Augustus September Oktober November Desember Abbreviated (format) Jan Feb Mar Apr Mei Jun Jul Aug Sep Okt Nov Des Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) Januarie Februarie Maart April Mei Junie Julie Augustus September Oktober November Desember Abbreviated (stand-alone) Jan Feb Mar Apr Mei Jun Jul Aug Sep Okt Nov Des Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) 1ste kwartaal 2de kwartaal 3de kwartaal 4de kwartaal Abbreviated (format) K1 K2 K3 K4 Narrow (format) 1 2 3 4 Wide (stand-alone) 1ste kwartaal 2de kwartaal 3de kwartaal 4de kwartaal Abbreviated (stand-alone) K1 K2 K3 K4 Narrow (stand-alone) 1 2 3 4 Eras Wide voor Christus na Christus Abbreviated v.C. n.C. Narrow v.C. n.C. Date Formats Full 2008-02-05T18:30:30 = Dinsdag 05 Februarie 2008 1995-12-22T09:05:02 = Vrydag 22 Desember 1995 -0010-09-15T04:44:23 = Saterdag 15 September -10 Long 2008-02-05T18:30:30 = 05 Februarie 2008 1995-12-22T09:05:02 = 22 Desember 1995 -0010-09-15T04:44:23 = 15 September -10 Medium 2008-02-05T18:30:30 = 05 Feb 2008 1995-12-22T09:05:02 = 22 Des 1995 -0010-09-15T04:44:23 = 15 Sep -10 Short 2008-02-05T18:30:30 = 2008/02/05 1995-12-22T09:05:02 = 1995/12/22 -0010-09-15T04:44:23 = -010/09/15 Default 2008-02-05T18:30:30 = 05 Feb 2008 1995-12-22T09:05:02 = 22 Des 1995 -0010-09-15T04:44:23 = 15 Sep -10 Time Formats Full 2008-02-05T18:30:30 = 6:30:30 nm. UTC 1995-12-22T09:05:02 = 9:05:02 vm. UTC -0010-09-15T04:44:23 = 4:44:23 vm. UTC Long 2008-02-05T18:30:30 = 6:30:30 nm. UTC 1995-12-22T09:05:02 = 9:05:02 vm. UTC -0010-09-15T04:44:23 = 4:44:23 vm. UTC Medium 2008-02-05T18:30:30 = 6:30:30 nm. 1995-12-22T09:05:02 = 9:05:02 vm. -0010-09-15T04:44:23 = 4:44:23 vm. Short 2008-02-05T18:30:30 = 6:30 nm. 1995-12-22T09:05:02 = 9:05 vm. -0010-09-15T04:44:23 = 4:44 vm. Default 2008-02-05T18:30:30 = 6:30:30 nm. 1995-12-22T09:05:02 = 9:05:02 vm. -0010-09-15T04:44:23 = 4:44:23 vm. Datetime Formats Full 2008-02-05T18:30:30 = Dinsdag 05 Februarie 2008 6:30:30 nm. UTC 1995-12-22T09:05:02 = Vrydag 22 Desember 1995 9:05:02 vm. UTC -0010-09-15T04:44:23 = Saterdag 15 September -10 4:44:23 vm. UTC Long 2008-02-05T18:30:30 = 05 Februarie 2008 6:30:30 nm. UTC 1995-12-22T09:05:02 = 22 Desember 1995 9:05:02 vm. UTC -0010-09-15T04:44:23 = 15 September -10 4:44:23 vm. UTC Medium 2008-02-05T18:30:30 = 05 Feb 2008 6:30:30 nm. 1995-12-22T09:05:02 = 22 Des 1995 9:05:02 vm. -0010-09-15T04:44:23 = 15 Sep -10 4:44:23 vm. Short 2008-02-05T18:30:30 = 2008/02/05 6:30 nm. 1995-12-22T09:05:02 = 1995/12/22 9:05 vm. -0010-09-15T04:44:23 = -010/09/15 4:44 vm. Default 2008-02-05T18:30:30 = 05 Feb 2008 6:30:30 nm. 1995-12-22T09:05:02 = 22 Des 1995 9:05:02 vm. -0010-09-15T04:44:23 = 15 Sep -10 4:44:23 vm. Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 Di 1995-12-22T09:05:02 = 22 Vr -0010-09-15T04:44:23 = 15 Sa Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 nm. 1995-12-22T09:05:02 = 9:05 vm. -0010-09-15T04:44:23 = 4:44 vm. Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 nm. 1995-12-22T09:05:02 = 9:05:02 vm. -0010-09-15T04:44:23 = 4:44:23 vm. M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = Di, 2-5 1995-12-22T09:05:02 = Vr, 12-22 -0010-09-15T04:44:23 = Sa, 9-15 MMdd (MM/dd) 2008-02-05T18:30:30 = 02/05 1995-12-22T09:05:02 = 12/22 -0010-09-15T04:44:23 = 09/15 MMM (LLL) 2008-02-05T18:30:30 = Feb 1995-12-22T09:05:02 = Des -0010-09-15T04:44:23 = Sep MMMd (MMM d) 2008-02-05T18:30:30 = Feb 5 1995-12-22T09:05:02 = Des 22 -0010-09-15T04:44:23 = Sep 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Di Feb 5 1995-12-22T09:05:02 = Vr Des 22 -0010-09-15T04:44:23 = Sa Sep 15 MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 Februarie 1995-12-22T09:05:02 = 22 Desember -0010-09-15T04:44:23 = 15 September MMMMdd (dd MMMM) 2008-02-05T18:30:30 = 05 Februarie 1995-12-22T09:05:02 = 22 Desember -0010-09-15T04:44:23 = 15 September MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Di Februarie 5 1995-12-22T09:05:02 = Vr Desember 22 -0010-09-15T04:44:23 = Sa September 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = Di, 2008-2-5 1995-12-22T09:05:02 = Vr, 1995-12-22 -0010-09-15T04:44:23 = Sa, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Feb 1995-12-22T09:05:02 = 1995 Des -0010-09-15T04:44:23 = -10 Sep yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Di, 2008 Feb 5 1995-12-22T09:05:02 = Vr, 1995 Des 22 -0010-09-15T04:44:23 = Sa, -10 Sep 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Februarie 1995-12-22T09:05:02 = 1995 Desember -0010-09-15T04:44:23 = -10 September yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 K1 1995-12-22T09:05:02 = 1995 K4 -0010-09-15T04:44:23 = -10 K3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMM (yyyy/MM) 2008-02-05T18:30:30 = 2008/02 1995-12-22T09:05:02 = 1995/12 -0010-09-15T04:44:23 = -010/09 yyyyMMMM (MMMM y) 2008-02-05T18:30:30 = Februarie 2008 1995-12-22T09:05:02 = Desember 1995 -0010-09-15T04:44:23 = September -10 Miscellaneous Prefers 24 hour time? No Local first day of the week Maandag SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.3 2014-06-10 DateTime::Locale::af_ZA(3)