Sponsored Content
Top Forums Shell Programming and Scripting Using nested for loop to iterate over file names Post 302932511 by RudiC on Thursday 22nd of January 2015 04:46:20 AM
Old 01-22-2015
Try also (using Don Cragun's array):
Code:
echo "${files[@]}" | xargs -n5 | while read -a ARR; do echo ${#ARR[@]}, ${ARR[@]}; done
5, AAA BBB CCC DDD EEE
5, FFF GGG HHH III JJJ
5, KKK LLL MMM NNN OOO
2, PPP QQQ

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File Names in a Variable in a loop

Hi All , I am having confusion in a shell script. Please guide me. I need to get multiple files (number of files vary time to time, file names are separated by '|') using FTP get from the remote server. Actually, i call the FTP function in a loop. At the last step, i need to move all the get... (3 Replies)
Discussion started by: spkandy
3 Replies

2. Shell Programming and Scripting

Problem with File Names under tcsh loop

Hello, I have a question regarding file naming under a loop in tcsh. I have the following code: #!/bin/tcsh foreach file (test/ProteinDirectory/*) # The * is a bunch of ProteinFile1, ProteinFile2, ProteinFile3, etc. sh /bioinfo/home/dgendoo/THREADER/pGenThreader.sh $file $file ... (4 Replies)
Discussion started by: InfoSeeker
4 Replies

3. Shell Programming and Scripting

big xml file with nested loop parse

I have an xml file with the structure: <tag1> <value1>xyx</value1> <value2>123</value2> </tag1> <tag1> <value1>568</value1> <value2>zzzzz</value2> </tag1> where I want to parse each data pair in the this single file, so something like: find first tag1 data pair... (1 Reply)
Discussion started by: unclecameron
1 Replies

4. Shell Programming and Scripting

How to loop(Iterate) through List with foreach(csh)

Hey all,, I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use. lets say i have a list.. set arr=(x y z e f) I wanna iterate the list with foreach ,, not with while.!! foreach i $arr echo $i end does not work (2 Replies)
Discussion started by: eawedat
2 Replies

5. UNIX for Dummies Questions & Answers

Iterate/Loop Through XML Node List

I need to load an XML file and loop through a list of nodes in it to execute a shell script for each one using the attributes for each node as parameters for the script. Any ideas? Any help will be much appreciated. (1 Reply)
Discussion started by: bradlecat
1 Replies

6. Shell Programming and Scripting

Do loop doesn't iterate

I'm trying to send the file list as parameter to another job and execute it. But the loop doesn't work, the inner job is running only once and not twice as expected for filelist in $(ls -rt *.txt | tail -2) do echo $filelist export filelist cmd="$Program -config $configfile -autoexec... (11 Replies)
Discussion started by: asandy1234
11 Replies

7. Shell Programming and Scripting

Iterate array using loop over ssh

A simple script: #!/bin/bash test=test test1=(test1 test2 test3) echo ${test1 } ssh server 'echo '$test'; echo '${test1 }' ; echo '${test1}' ; for m in $(seq 1 $(echo '${test1 }' | tr " " "\n" | wc -l)); do echo $m ; echo '${test1}'; done'Here is the result: test1 test2 test3 testing... (5 Replies)
Discussion started by: mharald
5 Replies

8. Shell Programming and Scripting

Print file names in a loop

OS : RHEL 6.1 Shell : Bash I have lots of files in /tmp/stage directory as show below. Using a loop, I need to print all the filenames in this directory except those ending with a number. How can I do this ? # pwd /tmp/stage # # # ls -l * -rw-r--r--. 1 root root 0 Oct 7 18:38 stmt1... (2 Replies)
Discussion started by: kraljic
2 Replies

9. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies

10. Programming

FORTRAN: Loop over variable file names

Hi guys I'm a beginner in fortran. So excuse me for my naivety, let me briefly describe what I was trying to do. I have let's say 2 files named reac-1 and reac-2. After opening these files I've to do some calculations, close these files and open the same files again in a loop. So my faulty code... (6 Replies)
Discussion started by: saleheen
6 Replies
DateTime::Locale::uk_UA(3)				User Contributed Perl Documentation				DateTime::Locale::uk_UA(3)

NAME
DateTime::Locale::uk_UA SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'uk_UA' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Ukrainian Ukraine. DATA
This locale inherits from the DateTime::Locale::uk locale. It contains the following data. Days Wide (format) XXXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (format) XX XX XX XX XX XX XX Narrow (format) X X X X X X X Wide (stand-alone) XXXXXXXXX XXXXXXXX XXXXXX XXXXXX XXXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XX XX XX XX XX XX XX Narrow (stand-alone) X X X X X X X Months Wide (format) XXXXX XXXXXX XXXXXXX XXXXXX XXXXXX XXXXXX XXXXX XXXXXX XXXXXXX XXXXXX XXXXXXXXX XXXXXX Abbreviated (format) XXX. XXX. XXX. XXXX. XXXX. XXXX. XXX. XXXX. XXX. XXXX. XXXX. XXXX. Narrow (format) X X X X X X X X X X X X Wide (stand-alone) XXXXXX XXXXX XXXXXXXX XXXXXXX XXXXXXX XXXXXXX XXXXXX XXXXXXX XXXXXXXX XXXXXXX XXXXXXXX XXXXXXX Abbreviated (stand-alone) XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX Narrow (stand-alone) X X X X X X X X X X X X Quarters Wide (format) I XXXXXXX II XXXXXXX III XXXXXXX IV XXXXXXX Abbreviated (format) I XX. II XX. III XX. IV XX. Narrow (format) 1 2 3 4 Wide (stand-alone) I XXXXXXX II XXXXXXX III XXXXXXX IV XXXXXXX Abbreviated (stand-alone) I XX. II XX. III XX. IV XX. Narrow (stand-alone) 1 2 3 4 Eras Wide XX XXXXX XXX XXXXX XXX Abbreviated XX X.X. X.X. Narrow XX X.X. X.X. Date Formats Full 2008-02-05T18:30:30 = XXXXXXXX, 5 XXXXXX 2008 X. 1995-12-22T09:05:02 = XXXXXXXX, 22 XXXXXX 1995 X. -0010-09-15T04:44:23 = XXXXXX, 15 XXXXXXX -10 X. Long 2008-02-05T18:30:30 = 5 XXXXXX 2008 X. 1995-12-22T09:05:02 = 22 XXXXXX 1995 X. -0010-09-15T04:44:23 = 15 XXXXXXX -10 X. Medium 2008-02-05T18:30:30 = 5 XXX. 2008 1995-12-22T09:05:02 = 22 XXXX. 1995 -0010-09-15T04:44:23 = 15 XXX. -10 Short 2008-02-05T18:30:30 = 05.02.08 1995-12-22T09:05:02 = 22.12.95 -0010-09-15T04:44:23 = 15.09.-10 Default 2008-02-05T18:30:30 = 5 XXX. 2008 1995-12-22T09:05:02 = 22 XXXX. 1995 -0010-09-15T04:44:23 = 15 XXX. -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, 5 XXXXXX 2008 X. 18:30:30 UTC 1995-12-22T09:05:02 = XXXXXXXX, 22 XXXXXX 1995 X. 09:05:02 UTC -0010-09-15T04:44:23 = XXXXXX, 15 XXXXXXX -10 X. 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 XXXXXX 2008 X. 18:30:30 UTC 1995-12-22T09:05:02 = 22 XXXXXX 1995 X. 09:05:02 UTC -0010-09-15T04:44:23 = 15 XXXXXXX -10 X. 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 XXX. 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXX. 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXX. -10 04:44:23 Short 2008-02-05T18:30:30 = 05.02.08 18:30 1995-12-22T09:05:02 = 22.12.95 09:05 -0010-09-15T04:44:23 = 15.09.-10 04:44 Default 2008-02-05T18:30:30 = 5 XXX. 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXX. 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXX. -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 XX 1995-12-22T09:05:02 = 22 XX -0010-09-15T04:44:23 = 15 XX HHmm (HH:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 HHmmss (HH:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 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 XX 1995-12-22T09:05:02 = 9:05 XX -0010-09-15T04:44:23 = 4:44 XX 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 XX 1995-12-22T09:05:02 = 9:05:02 XX -0010-09-15T04:44:23 = 4:44:23 XX 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 = XX, 2-5 1995-12-22T09:05:02 = XX, 12-22 -0010-09-15T04:44:23 = XX, 9-15 MMdd (dd.MM) 2008-02-05T18:30:30 = 05.02 1995-12-22T09:05:02 = 22.12 -0010-09-15T04:44:23 = 15.09 MMM (LLL) 2008-02-05T18:30:30 = XXX 1995-12-22T09:05:02 = XXX -0010-09-15T04:44:23 = XXX MMMd (d MMM) 2008-02-05T18:30:30 = 5 XXX. 1995-12-22T09:05:02 = 22 XXXX. -0010-09-15T04:44:23 = 15 XXX. MMMEd (E, d MMM) 2008-02-05T18:30:30 = XX, 5 XXX. 1995-12-22T09:05:02 = XX, 22 XXXX. -0010-09-15T04:44:23 = XX, 15 XXX. MMMMd (d MMMM) 2008-02-05T18:30:30 = 5 XXXXXX 1995-12-22T09:05:02 = 22 XXXXXX -0010-09-15T04:44:23 = 15 XXXXXXX MMMMEd (E, d MMMM) 2008-02-05T18:30:30 = XX, 5 XXXXXX 1995-12-22T09:05:02 = XX, 22 XXXXXX -0010-09-15T04:44:23 = XX, 15 XXXXXXX mmss (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 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 = XX, 2008-2-5 1995-12-22T09:05:02 = XX, 1995-12-22 -0010-09-15T04:44:23 = XX, -10-9-15 yMMM (LLL y) 2008-02-05T18:30:30 = XXX 2008 1995-12-22T09:05:02 = XXX 1995 -0010-09-15T04:44:23 = XXX -10 yMMMEd (EEE, d MMM y) 2008-02-05T18:30:30 = XX, 5 XXX. 2008 1995-12-22T09:05:02 = XX, 22 XXXX. 1995 -0010-09-15T04:44:23 = XX, 15 XXX. -10 yMMMM (LLLL y) 2008-02-05T18:30:30 = XXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXX -10 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 I XX. 1995-12-22T09:05:02 = 1995 IV XX. -0010-09-15T04:44:23 = -10 III XX. yyMM (MM.yy) 2008-02-05T18:30:30 = 02.08 1995-12-22T09:05:02 = 12.95 -0010-09-15T04:44:23 = 09.-10 yyMMM (LLL yy) 2008-02-05T18:30:30 = XXX 08 1995-12-22T09:05:02 = XXX 95 -0010-09-15T04:44:23 = XXX -10 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 yyyyMMMM (LLLL y) 2008-02-05T18:30:30 = XXXXX 2008 1995-12-22T09:05:02 = XXXXXXX 1995 -0010-09-15T04:44:23 = XXXXXXXX -10 yyyyQQQQ (QQQQ y 'X'.) 2008-02-05T18:30:30 = I XXXXXXX 2008 X. 1995-12-22T09:05:02 = IV XXXXXXX 1995 X. -0010-09-15T04:44:23 = III XXXXXXX -10 X. Miscellaneous Prefers 24 hour time? Yes Local first day of the week XXXXXXXXX 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::uk_UA(3)
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy