|
On Jun 18, 2017, at 4:07 PM, mlazarus <mlazarus@xxxxxxxx> wrote:
I am attempting to do renames in an IFS folder using a wildcard pattern. The native IFS commands to not seem to allow wildcards, so I adapted this from a tip published by Ted Holt.
The code is:
QSH CMD('cd /usr/Mark/Downloads/;for file in *.n37;do mv "$file" "$(basename $file n37)h37";done')
It was taking a long time, so I pared it down to this statement as a test:
QSH CMD('cd /usr/Mark/Downloads/;for file in *.h37;do ls "$file";done') from the command line.
There are 54 entries out of 56 (plus . and ..) that match the pattern. It took over 1/2 minute to display the first entry. The entire run took about 14.5 minutes. So it's averaging 25-26 seconds per entry. This is on a lightly utilized v7r3 Power8, that is quite fast for most other operations.
1) Can someone explain what it's doing for it to take so long?
2) I assume there's a much better alternative. I'm looking for ideas to do this with a minimal amount of code.
TIA.
-mark
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.