Sponsored Content
Full Discussion: For Loop queries
Top Forums Shell Programming and Scripting For Loop queries Post 303011703 by Scott on Monday 22nd of January 2018 04:01:51 PM
Old 01-22-2018
Have you considered reading "dynamic_years.txt" first, in a while-loop, and applying that to the inner for-loop?

e.g.
Code:
while read YEAR; do
  for i in XYZ_*ABC$YEAR.csv; do
    printf "%s\n" "$i"
  done | zip -@ XYZ_$YEAR.zip  >> XYZ_$YEAR.log 2>&1 || ERROR_COUNT=$((ERROR_COUNT + 1))
done < dynamic_years.txt

This User Gave Thanks to Scott For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Some queries...

Guys need some advice on how to check some of the questions below? i'm running on an open VMS platform... which i am an idiot to... appreciate if anyone can give some hints or source on how to check on.. a script that is running on cron job... but doesn't run as the login user name.. 1. why... (6 Replies)
Discussion started by: 12yearold
6 Replies

2. UNIX for Advanced & Expert Users

Two small queries

Query 1 : How to check if a directory already exists? If doesn't exist then create a new one. Query 2 : I want to put following text using a single echo statement into a log file and also want to retain the formatting of the text. How it can be... (3 Replies)
Discussion started by: skyineyes
3 Replies

3. Shell Programming and Scripting

my queries

hi guys Well, i need to have a report generation script or any script which will show me all the content/information of a file when i run that script. Please help me on this isssue at the earliest.As i am little bit aware of scripting.Thanks in advance! regards ash (4 Replies)
Discussion started by: whizkidash
4 Replies

4. Homework & Coursework Questions

Queries

Any help on like where to get started on this? I'm just confused. 1. The problem statement, all variables and given/known data: Enter text here.Queries to satisfy these two report requests (use your CCI database): Retrieve all rows of active inventory where current on hands is less than... (0 Replies)
Discussion started by: lakers34kb
0 Replies

5. Shell Programming and Scripting

Few queries regarding awk...

One of the command output is as below. -rw-r--r--+ 1 root root 75G Nov 21 16:43 /var/ovs/mount/86BXXX/running_pool/Machine1/System-sda.img -rw-r--r--+ 1 root root 75G Nov 21 16:36 /var/ovs/mount/86BXXX/running_pool/Machine2/System.img -rw-r--r--+ 1 root root 150G Sep 23 19:13... (2 Replies)
Discussion started by: pinga123
2 Replies

6. Programming

Combine 3 queries

can these 3 be combined into 1 query? createtablea1as selecta.tps_Res_nb, b.tkt_prod_cd, b.tkt_prod_typ_nm, b.prod_intrnl_ds, b.tkt_prod_typ_nm AS TKT_ENTL_NM, casewhen b.tkt_prod_nm isnotnullthen b.tkt_prod_nm when b.tkt_prod_nm isnulland b.prod_intrnl_ds isnotnullthen... (1 Reply)
Discussion started by: dwr80
1 Replies

7. UNIX for Advanced & Expert Users

How many DNS queries

Is there any way to see how many queries come into our external DNS server? In looking at DNS providers, most of them base pricing on number of queries per month so I just wanted to see if you had any idea/way of gathering that data? A rough ballpark figure would even work. Our DNS server is... (1 Reply)
Discussion started by: raggmopp
1 Replies

8. IP Networking

RDNS Queries

Hey everyone, I have a question, I've been playing around with tcpdump, and noticed my machine making numerous rdns look ups. They are displayed like: 10.80.80.141.51234 > 10.80.80.1.domain: 9950+ PTR? 223.114.55.65.in-addr.arpa. (44) My question is, if dns works based on numerical... (0 Replies)
Discussion started by: Lost in Cyberia
0 Replies

9. UNIX Desktop Questions & Answers

/etc/motd - queries

If I have /etc/motd, he is file or directory? I saw that some call them folders and files others... Which option is better? I knew that being a director, but many told me not. Thank you! (1 Reply)
Discussion started by: mescu
1 Replies
SCHROOT-SCRIPT-CONFIG(5)					   Debian sbuild					  SCHROOT-SCRIPT-CONFIG(5)

NAME
schroot-script-config - schroot chroot setup script configuration DESCRIPTION
schroot uses scripts to set up and then clean up the chroot environment. These scripts may be customised using the script-config key in /etc/schroot/schroot.conf. This key specifies a file which the setup scripts will source when they are run. The file is a Bourne shell script, and in consequence may contain any valid shell code, in addition to simple variable assignments. This will, for example, allow be- haviour to be customised according to the specific chroot type or name. This file is deprecated, but is still used if present; it will be obsoleted and removed in a future release. All the settings in this file are now settable using configuration keys in schroot.conf, as detailed below. Existing configuration should be modified to use these keys in place of this file. ENVIRONMENT
The environment is the same as for all setup scripts, described in schroot-setup(5). VARIABLES
The following variables may be set to configure setup script behaviour. Note that new variables may be added in future releases. Third- party extensions to schroot which add their own setup scripts may add additional variables which are not documented here; consult the extension documentation for further details. SETUP_COPYFILES A file containing a list of files to copy into the chroot (one file per line). The file will have the same absolute location inside the chroot. Note that this is settable using the setup.copyfiles key. SETUP_FSTAB The filesystem table file to be used to mount filesystems within the chroot. The format of this file is the same as for /etc/fstab, documented in fstab(5). The only difference is that the mountpoint path fs_dir is relative to the chroot, rather than the root. Note that this is settable using the setup.fstab key. Also note that mountpoints are canonicalised on the host, which will ensure that absolute symlinks point inside the chroot, but complex paths containing multiple symlinks may be resolved incorrectly; it is advised to not use nested symlinks as mountpoints. SETUP_NSSDATABASES A file listing the system databases to copy into the chroot. The default databases are 'passwd', 'shadow', 'group', 'services', 'protocols', 'networks', and 'hosts'. 'gshadow' is not yet copied by default, due to not being supported by all but the most recent version of the GNU C library. The databases are copied using getent(1) so all database sources listed in /etc/nsswitch.conf will be used for each database. Note that this is settable using the setup.nssdatabases key. AUTHORS
Roger Leigh. COPYRIGHT
Copyright (C) 2005-2012 Roger Leigh <rleigh@debian.org> schroot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SEE ALSO
sbuild(1), schroot(1), sh(1), schroot.conf(5), schroot-setup(5). Version 1.6.4 27 Oct 2012 SCHROOT-SCRIPT-CONFIG(5)
All times are GMT -4. The time now is 01:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy