Sponsored Content
Full Discussion: Loop over variable content
Top Forums Shell Programming and Scripting Loop over variable content Post 302544230 by fpmurphy on Wednesday 3rd of August 2011 08:51:10 AM
Old 08-03-2011
Here is a pure shell solution:
Code:
#!/bin/bash

while read a b c d e f
do
    if [[ "$a $b $c" == "Waiting for job"  && "$e $f" == "to start" ]]
    then
        echo "$d"
    fi
done < file

Using you example file, the output is:
Code:
XXXXXXX
YYYYYY
ZZZZZZ

 

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::az_Cyrl_AZ(3) 			User Contributed Perl Documentation			   DateTime::Locale::az_Cyrl_AZ(3)

NAME
DateTime::Locale::az_Cyrl_AZ SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'az_Cyrl_AZ' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Azerbaijani Cyrillic Azerbaijan. DATA
This locale inherits from the DateTime::Locale::az_Cyrl locale. It contains the following data. Days Wide (format) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Abbreviated (format) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Narrow (format) 1 2 3 4 5 6 7 Wide (stand-alone) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Abbreviated (stand-alone) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Narrow (stand-alone) 1 2 3 4 5 6 7 Months Wide (format) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Abbreviated (format) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) 1-ci kvartal 2-ci kvartal 3-cue kvartal 4-cue kvartal Abbreviated (format) 1-ci kv. 2-ci kv. 3-cue kv. 4-cue kv. Narrow (format) 1 2 3 4 Wide (stand-alone) 1-ci kvartal 2-ci kvartal 3-cue kvartal 4-cue kvartal Abbreviated (stand-alone) 1-ci kv. 2-ci kv. 3-cue kv. 4-cue kv. Narrow (stand-alone) 1 2 3 4 Eras Wide eramXzdan XvvXl bizim eramXzXn Abbreviated e.X. b.e. Narrow e.X. b.e. Date Formats Full 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 5, XXXXXX, 2008 1995-12-22T09:05:02 = XXXX, 22, XXXXXX, 1995 -0010-09-15T04:44:23 = XXXXX, 15, XXXXXXXX, -10 Long 2008-02-05T18:30:30 = 5 XXXXXX , 2008 1995-12-22T09:05:02 = 22 XXXXXX , 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX , -10 Medium 2008-02-05T18:30:30 = 5 XXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 Short 2008-02-05T18:30:30 = 08/02/05 1995-12-22T09:05:02 = 95/12/22 -0010-09-15T04:44:23 = -10/09/15 Default 2008-02-05T18:30:30 = 5 XXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 5, XXXXXX, 2008 18:30:30 UTC 1995-12-22T09:05:02 = XXXX, 22, XXXXXX, 1995 09:05:02 UTC -0010-09-15T04:44:23 = XXXXX, 15, XXXXXXXX, -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 XXXXXX , 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 XXXXXX , 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 XXXXXXXX , -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 XXXXXX, 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXXXX, 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 04:44:23 Short 2008-02-05T18:30:30 = 08/02/05 18:30 1995-12-22T09:05:02 = 95/12/22 09:05 -0010-09-15T04:44:23 = -10/09/15 04:44 Default 2008-02-05T18:30:30 = 5 XXXXXX, 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXXXX, 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 04:44:23 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 XXXXXX 1995-12-22T09:05:02 = 22 XXXX -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 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM 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 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM 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 = XXXXXXXX XXXXXX, 2-5 1995-12-22T09:05:02 = XXXX, 12-22 -0010-09-15T04:44:23 = XXXXX, 9-15 MMM (LLL) 2008-02-05T18:30:30 = XXXXXX 1995-12-22T09:05:02 = XXXXXX -0010-09-15T04:44:23 = XXXXXXXX MMMd (MMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX XXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXX 22 -0010-09-15T04:44:23 = XXXXX XXXXXXXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXX 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX XXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXX 22 -0010-09-15T04:44:23 = XXXXX XXXXXXXX 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 = XXXXXXXX XXXXXX, 2008-2-5 1995-12-22T09:05:02 = XXXX, 1995-12-22 -0010-09-15T04:44:23 = XXXXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2008 XXXXXX 5 1995-12-22T09:05:02 = XXXX, 1995 XXXXXX 22 -0010-09-15T04:44:23 = XXXXX, -10 XXXXXXXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXX 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 1-ci kv. 1995-12-22T09:05:02 = 1995 4-cue kv. -0010-09-15T04:44:23 = -10 3-cue kv. yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes 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.16.2 2013-08-25 DateTime::Locale::az_Cyrl_AZ(3)
All times are GMT -4. The time now is 10:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy