Sponsored Content
Full Discussion: Loop over variable content
Top Forums Shell Programming and Scripting Loop over variable content Post 302544223 by yazu on Wednesday 3rd of August 2011 08:40:55 AM
Old 08-03-2011
Code:
a='LINE HELLO
Waiting for job XXXXXXX to start
LINE HOW ARE YOU DOING
LINE FINE
Waiting for job YYYYYY to start
Waiting for job ZZZZZZ to start
MORE LINES'

echo "$a" | while read line; do
  if echo "$line" | grep -q '^Waiting'; then
      echo "do something with '$line'"
  fi
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to replace a variable content

Hi, variable1="This is a car" Now I want to replace the content of variable1, "car" to "dog". Is there any simple command I can use. Thanks. Joseph (4 Replies)
Discussion started by: josephwong
4 Replies

2. Shell Programming and Scripting

Content of Content of a variable!

I got a sample BASH script like this : $ cat test MYVAR=$1 DUMMY1="This is tricky" DUMMY2=24 echo $ $ ./test DUMMY1 ./test: line 5: This is tricky: syntax error in expression (error token is "is tricky") **I was expecting the output as "This is tricky", ah! but no luck **But... (2 Replies)
Discussion started by: jaduks
2 Replies

3. Shell Programming and Scripting

Content of variable

I have a variable that contains filenames like this: variable="file_1.extension<blank>file_2.extension<blank>file_3.extension<blank>file_4.extension and so on" How can I make filenames to be separated by newline: (I tried Sed but it didn't worked well) file_1.extension file_2.extension... (6 Replies)
Discussion started by: MartyIX
6 Replies

4. Shell Programming and Scripting

addressing variable content...

I want to address a variable content whose name is/matches the content of a given other variable. i.e. set name=´sam´ set ${name}_age=´27´ So, by typing: echo ${name}_age I correctly obtain: sam_age By typing: echo $sam_age or echo ${sam_age} I correctly obtain: 27 But how can I... (3 Replies)
Discussion started by: sobolev
3 Replies

5. Shell Programming and Scripting

how to get the specified content of the text into a variable.

I am having one string like ./usr1/Server/temp/app.env ./usr1/Server/temp/upp/app.env ./usr1/Server/ORIG_temp/app.env ./usr1/Server/ORIG_temp/upp/app.env ./usr1/Server/work_temp_40/app.env ./usr1/Server/work_temp_40/upp/app.env ./usr1/fd/app.env ./usr1/PurgeArchive/app.env ./usr1/bm/bin/app.env... (6 Replies)
Discussion started by: dineshmurs
6 Replies

6. Shell Programming and Scripting

[SHELL: /bin/sh] For loop using variable variable names

Simple enough problem I think, I just can't seem to get it right. The below doesn't work as intended, it's just a function defined in a much larger script: CheckValues() { for field in \ Group_ID \ Group_Title \ Rule_ID \ Rule_Severity \ ... (2 Replies)
Discussion started by: Vryali
2 Replies

7. Shell Programming and Scripting

printing variable with variable suffix through loop

I have a group of variables myLINEcnt1 - myLINEcnt10. I'm trying to printout the values using a for loop. I am at the head banging stage since i'm sure it has to be a basic syntax issue that i can't figure out. For myIPgrp in 1 2 3 4 5 6 7 8 9 10; do here i want to output the value of... (4 Replies)
Discussion started by: oly_r
4 Replies

8. Shell Programming and Scripting

Array Variable being Assigned Values in Loop, But Gone when Loop Completes???

Hello All, Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....? I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies

9. Shell Programming and Scripting

[Solved] How to increment and add variable length numbers to a variable in a loop?

Hi All, I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies

10. UNIX for Dummies Questions & Answers

Getting ls content into a file using variable

hi i just cant figure out how can i do this ls -lt > log.txt using $PWD what i mean is how can i get the ls command content into a file using $PWD variable? :confused: (4 Replies)
Discussion started by: chinababy
4 Replies
DateTime::Locale::ar_YE(3)				User Contributed Perl Documentation				DateTime::Locale::ar_YE(3)

NAME
DateTime::Locale::ar_YE SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'ar_YE' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Arabic Yemen. DATA
This locale inherits from the DateTime::Locale::ar locale. It contains the following data. Days Wide (format) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Abbreviated (format) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Narrow (format) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Wide (stand-alone) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Abbreviated (stand-alone) XXXXXXX XXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXX XXXXX Narrow (stand-alone) X X X X X X X Months Wide (format) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Abbreviated (format) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Narrow (format) X X X X X X X X X X X X Wide (stand-alone) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXXXX XXXXXX XXXX XXXXX XXXX XXXXX XXXXX XXXXX XXXXXX XXXXXX XXXXXX XXXXXX Narrow (stand-alone) X X X X X X X X X X X X Quarters Wide (format) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Abbreviated (format) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Narrow (format) X X X X Wide (stand-alone) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Abbreviated (stand-alone) XXXXX XXXXX XXXXX XXXXXX XXXXX XXXXXX XXXXX XXXXXX Narrow (stand-alone) X X X X Eras Wide XXX XXXXXXX XXXXXX Abbreviated X.X X Narrow X.X X Date Formats Full 2008-02-05T18:30:30 = XXXXXXXXX 5 XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 22 XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX 15 XXXXXXX -10 Long 2008-02-05T18:30:30 = 5 XXXXXXX 2008 1995-12-22T09:05:02 = 22 XXXXXXX 1995 -0010-09-15T04:44:23 = 15 XXXXXXX -10 Medium 2008-02-05T18:30:30 = 05X/02X/2008 1995-12-22T09:05:02 = 22X/12X/1995 -0010-09-15T04:44:23 = 15X/09X/-010 Short 2008-02-05T18:30:30 = 5X/2X/2008 1995-12-22T09:05:02 = 22X/12X/1995 -0010-09-15T04:44:23 = 15X/9X/-010 Default 2008-02-05T18:30:30 = 05X/02X/2008 1995-12-22T09:05:02 = 22X/12X/1995 -0010-09-15T04:44:23 = 15X/09X/-010 Time Formats Full 2008-02-05T18:30:30 = UTC 6:30:30 X 1995-12-22T09:05:02 = UTC 9:05:02 X -0010-09-15T04:44:23 = UTC 4:44:23 X Long 2008-02-05T18:30:30 = UTC 6:30:30 X 1995-12-22T09:05:02 = UTC 9:05:02 X -0010-09-15T04:44:23 = UTC 4:44:23 X Medium 2008-02-05T18:30:30 = 6:30:30 X 1995-12-22T09:05:02 = 9:05:02 X -0010-09-15T04:44:23 = 4:44:23 X Short 2008-02-05T18:30:30 = 6:30 X 1995-12-22T09:05:02 = 9:05 X -0010-09-15T04:44:23 = 4:44 X Default 2008-02-05T18:30:30 = 6:30:30 X 1995-12-22T09:05:02 = 9:05:02 X -0010-09-15T04:44:23 = 4:44:23 X Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXXX 5 XXXXXXX 2008 UTC 6:30:30 X 1995-12-22T09:05:02 = XXXXXXX 22 XXXXXXX 1995 UTC 9:05:02 X -0010-09-15T04:44:23 = XXXXXX 15 XXXXXXX -10 UTC 4:44:23 X Long 2008-02-05T18:30:30 = 5 XXXXXXX 2008 UTC 6:30:30 X 1995-12-22T09:05:02 = 22 XXXXXXX 1995 UTC 9:05:02 X -0010-09-15T04:44:23 = 15 XXXXXXX -10 UTC 4:44:23 X Medium 2008-02-05T18:30:30 = 05X/02X/2008 6:30:30 X 1995-12-22T09:05:02 = 22X/12X/1995 9:05:02 X -0010-09-15T04:44:23 = 15X/09X/-010 4:44:23 X Short 2008-02-05T18:30:30 = 5X/2X/2008 6:30 X 1995-12-22T09:05:02 = 22X/12X/1995 9:05 X -0010-09-15T04:44:23 = 15X/9X/-010 4:44 X Default 2008-02-05T18:30:30 = 05X/02X/2008 6:30:30 X 1995-12-22T09:05:02 = 22X/12X/1995 9:05:02 X -0010-09-15T04:44:23 = 15X/09X/-010 4:44:23 X 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 XXXXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXX 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 X 1995-12-22T09:05:02 = 9:05 X -0010-09-15T04:44:23 = 4:44 X 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 X 1995-12-22T09:05:02 = 9:05:02 X -0010-09-15T04:44:23 = 4:44:23 X M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (d/XM) 2008-02-05T18:30:30 = 5/X2 1995-12-22T09:05:02 = 22/X12 -0010-09-15T04:44:23 = 15/X9 MEd (EX d-M) 2008-02-05T18:30:30 = XXXXXXXXX 5-2 1995-12-22T09:05:02 = XXXXXXX 22-12 -0010-09-15T04:44:23 = XXXXXX 15-9 MMdd (ddX/MM) 2008-02-05T18:30:30 = 05X/02 1995-12-22T09:05:02 = 22X/12 -0010-09-15T04:44:23 = 15X/09 MMM (LLL) 2008-02-05T18:30:30 = XXXXXX 1995-12-22T09:05:02 = XXXXXX -0010-09-15T04:44:23 = XXXXXX MMMd (d MMM) 2008-02-05T18:30:30 = 5 XXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXXX MMMEd (E d MMM) 2008-02-05T18:30:30 = XXXXXXXX 5 XXXXXX 1995-12-22T09:05:02 = XXXXXX 22 XXXXXX -0010-09-15T04:44:23 = XXXXX 15 XXXXXX MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXXX MMMMEd (E d MMMM) 2008-02-05T18:30:30 = XXXXXXXX 5 XXXXXX 1995-12-22T09:05:02 = XXXXXX 22 XXXXXX -0010-09-15T04:44:23 = XXXXX 15 XXXXXX 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 (MX/yyyy) 2008-02-05T18:30:30 = 2X/2008 1995-12-22T09:05:02 = 12X/1995 -0010-09-15T04:44:23 = 9X/-010 yMEd (EEEX d/XM/Xyyyy) 2008-02-05T18:30:30 = XXXXXXXXX 5/X2/X2008 1995-12-22T09:05:02 = XXXXXXX 22/X12/X1995 -0010-09-15T04:44:23 = XXXXXX 15/X9/X-010 yMMM (MMM y) 2008-02-05T18:30:30 = XXXXXX 2008 1995-12-22T09:05:02 = XXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX -10 yMMMEd (EEEX d MMMM y) 2008-02-05T18:30:30 = XXXXXXXXX 5 XXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 22 XXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX 15 XXXXXX -10 yMMMM (MMMM y) 2008-02-05T18:30:30 = XXXXXX 2008 1995-12-22T09:05:02 = XXXXXX 1995 -0010-09-15T04:44:23 = XXXXXX -10 yQ (yyyy Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -010 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 XXXXX XXXXX 1995-12-22T09:05:02 = 1995 XXXXX XXXXXX -0010-09-15T04:44:23 = -10 XXXXX XXXXXX 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 (MMX/yyyy) 2008-02-05T18:30:30 = 02X/2008 1995-12-22T09:05:02 = 12X/1995 -0010-09-15T04:44:23 = 09X/-010 yyyyMMMM (MMMMX y) 2008-02-05T18:30:30 = XXXXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXX -10 Miscellaneous Prefers 24 hour time? No Local first day of the week XXXXX 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.18.2 2017-10-06 DateTime::Locale::ar_YE(3)
All times are GMT -4. The time now is 10:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy