× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



HI Mark
This is strictly guesswork
You are assuming it is ONLY looking at that one directory
Is there a chance it's looking at ALL directories?



Sent via the Samsung GALAXY S® 5, an AT&T 4G LTE smartphone


-------- Original message --------
From: mlazarus <mlazarus@xxxxxxxx>
Date: 6/18/17 5:08 PM (GMT-05:00)
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: QShell performance

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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.