HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Gaps in Sequence?
Operating System - HP-UX
1827315
Members
5416
Online
109961
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2003 09:11 AM
03-10-2003 09:11 AM
Gaps in Sequence?
Hello all Hp-UX gurus! I have a question related to my previous post (http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6b639c196a4bd71190080090279cd0f9,00.html)
I have this directory with (now) over 100000 images all named in order. Now I am missing some 16000. What can I do to find the gaps and spit them out to a file or something. I thought about making a huge list then doing a diff on the lists but that seem terribly slow and just.... well wrong. Please help me. Thanks!!
I have this directory with (now) over 100000 images all named in order. Now I am missing some 16000. What can I do to find the gaps and spit them out to a file or something. I thought about making a huge list then doing a diff on the lists but that seem terribly slow and just.... well wrong. Please help me. Thanks!!
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2003 09:27 AM
03-10-2003 09:27 AM
Re: Gaps in Sequence?
The simple answer could be:
START=1000001
STOP=1100000
I=${START}
while [[ ${I} -lt ${STOP} ]]
do
FNAME=LV${I}
if [[ ! -r ${FNAME} ]]
then
echo "${FNAME} is missing."
fi
I=$((${I} + 1))
done
START=1000001
STOP=1100000
I=${START}
while [[ ${I} -lt ${STOP} ]]
do
FNAME=LV${I}
if [[ ! -r ${FNAME} ]]
then
echo "${FNAME} is missing."
fi
I=$((${I} + 1))
done
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2003 09:36 AM
03-10-2003 09:36 AM
Re: Gaps in Sequence?
typeset -Z6 counter=100000
while (($counter < 200000)); do
file=LV${counter}.jpg
[[ -f $file ]] || echo $file missing
((counter=counter+1))
done
Best regards...
Dietmar.
while (($counter < 200000)); do
file=LV${counter}.jpg
[[ -f $file ]] || echo $file missing
((counter=counter+1))
done
Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2003 09:39 AM
03-10-2003 09:39 AM
Re: Gaps in Sequence?
# perl -le'%p=map{$_=>1}<*.jpg>;for("000000".."999999"){exists$p{"$_.jpg"}||print'
assuming the pigs are in the range of 000000.jpg to 999999.jpg
Enjoy, have FUN! H.Merijn
assuming the pigs are in the range of 000000.jpg to 999999.jpg
Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP