- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Print the hexa decimal numbers in between.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО07-14-2010 11:22 AM
тАО07-14-2010 11:22 AM
A quick request. Please let me know a quick way of printing the hexa decimal numbers between 5B40 and 5B42. ( 5B40,5B41 and 5B42 )
Yes, you guessed it right. It is the output of symmaskdb list db from a symmetrix.
Thanks in advance. (There might be a perl one liner somewhere but I am not able to find it.
Regards,
Kaps
Solved! Go to Solution.
- Tags:
- hex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 11:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 11:55 AM
тАО07-14-2010 11:55 AM
Re: Print the hexa decimal numbers in between.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 11:55 AM
тАО07-14-2010 11:55 AM
Re: Print the hexa decimal numbers in between.
Oops, the :
# perl -e 'printf "%0x\n",$_ for 0x5B40..0x5B42'
...was meant to be:
# perl -e 'printf "%#x\n",$_ for 0x5B40..0x5B42'
...if you want the output to include the leading '0x' to clearly signify hexadecimal. Drop that formatting directive if you don't want the '0x' but just the value.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-14-2010 08:58 PM - edited тАО07-11-2011 08:21 AM
тАО07-14-2010 08:58 PM - edited тАО07-11-2011 08:21 AM
Re: Print the hexadecimal numbers in between.
Or from a real shell:
typeset -i10 start=16#5B40 end=16#5B42
while (( start <= end )); do
printf '0x%x\n' $start
(( start += 1 ))
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-15-2010 06:19 AM
тАО07-15-2010 06:19 AM
Re: Print the hexa decimal numbers in between.
If you want your output to contain lowercase (0x) use:
# perl -e 'printf "%#x\n",$_ for 0xf..0x20'
(or):
# perl -e 'printf "%x\n",$_ for 0xf..0x20'
If you want the output to show uppercase (0X), use:
# perl -e 'printf "%#X\n",$_ for 0xf..0x20'
(or):
perl -e 'printf "%X\n",$_ for 0xf..0x20'
The range you specify can be in any number base (octal [with a leading zero as '010']; decimal; or hexadecimal).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 07:50 AM
тАО07-19-2010 07:50 AM
Re: Print the hexa decimal numbers in between.
I gave up on the hex conversion in the script. i.e. I was using "symmaskdb -sid
Thank you for the help. I am sure, I will run into this requirement in future. It was good education.
Regards, Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 10:17 AM
тАО07-19-2010 10:17 AM
Re: Print the hexa decimal numbers in between.
symdev list -RANGE 5b40:5B42
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 10:18 AM
тАО07-19-2010 10:18 AM
Re: Print the hexa decimal numbers in between.
symdev list -RANGE 5B40:5B42 | awk '{print $1}'
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2010 10:37 AM
тАО07-19-2010 10:37 AM