in reply to Re^5: To read files from two dir
in thread To read files from two dir
I had been away for a while from work due to some reasons and this issue is still pending. I will try to explain. In the original script, the topology files and the PM files were placed in the same directory, $VTIERBASE/pvc/ohdr/topology and the $SRC_DIR = $VTIERBASE/pvc/ohdr/topology. But in the new script, topology files are in $VTIERBASE/pvc/ohdr/topology and PM files are $VTIERBASE/pvc/ohdr/instance-0/preprocess. I need the $SRC_DIR to read both set of files from these two directories. I tried with the below
................. my @dir = ("$VTIERBASE/pvc/ohdr/topology","$VTIERBASE/pvc/ohdr/instanc +e-0/preprocess"); foreach my $SRC_DIR(@dir) ............................. #--------------------------------------------------------------------- +- # Validate the parameters #--------------------------------------------------------------------- +- my $file_cnt= scalar(@feed_files); logNdie "$PROGNAME: ERROR: Invalid number of feed files specified +($file_cnt). 8 are required!\n" unless $file_cnt == 8; # Build the complete path if not fully specified $DONE_DIR = "$VTIERBASE/pvc/ohdr/instance-0/cucp/$DONE_DIR" unles +s $DONE_DIR =~ m|^/|; $SRC_DIR = "$VTIERBASE/pvc/ohdr/topology/$SRC_DIR" unless $SRC_D +IR =~ m|^/|; <p> I am not sure how to use $SRC_DIR here</p> $DST_DIR = "$VTIERBASE/pvc/ohdr/instance-0/processed/$DST_DIR" u +nless $DST_DIR =~ m|^/|; # DST_DIR is where we output results ......................... exit 0; }
Please let me know if you need details
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: To read files from two dir
by graff (Chancellor) on Apr 23, 2022 at 01:06 UTC | |
Re^7: To read files from two dir
by graff (Chancellor) on Apr 23, 2022 at 00:37 UTC | |
by pragovnj (Acolyte) on Apr 25, 2022 at 20:38 UTC | |
by hippo (Archbishop) on Apr 25, 2022 at 22:31 UTC | |
by pragovnj (Acolyte) on Apr 26, 2022 at 15:05 UTC | |
by hippo (Archbishop) on Apr 26, 2022 at 15:17 UTC | |
|