- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- What does this do?
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
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
тАО08-10-2006 05:07 AM
тАО08-10-2006 05:07 AM
I found this line in a script and I have no idea what it is supposed to do.
echo "\033[11;21H\c"
Any ideas?
Thanks,
Greg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:17 AM
тАО08-10-2006 05:17 AM
Re: What does this do?
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:22 AM
тАО08-10-2006 05:22 AM
Re: What does this do?
The 033 is octal for ESCAPE (27 decimal) and with the "[" introduces the escape sequence.
The 11;21H is director cursor addressing:
row:colH
The remainder goes to the tube.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:23 AM
тАО08-10-2006 05:23 AM
SolutionIt sends ESC,[11;21H to stdout.
Now to avoid chastisement I will tell you what I think it is (and go find a baseball bat for programmer adjustment):
I think that is a sequence of characters that will position the cursor at coordinates
(11,21) on the screen although it mat well be coordinates (10,20) but I would have to see the terminfo entry for "cup" to know for sure. These ordered pairs normally refer to (y,x) positions although at this point this is speculation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:29 AM
тАО08-10-2006 05:29 AM
Re: What does this do?
http://www.termsys.demon.co.uk/vtansi.htm
As the previous poster have said, it positions the cursor on the 11th line, 21st column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:54 AM
тАО08-10-2006 05:54 AM
Re: What does this do?
tput cup 11 21 (though it actually may be 10 20 that's intended).
Using tput queries the terminfo database using the current TERM setting and looks up the cursor position sequence ("cup") and applies the parameters to instantiate the string.
Do an 'untic | grep "cup"' to find your current cursor positioning string. I suspect you will find a relationship between the "cup" entry and your raw string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 05:56 AM
тАО08-10-2006 05:56 AM
Re: What does this do?
I would hope that the programmer(?) would learn to use 'tput' for terminal independence, like:
# clear;echo "`tput cup 11 21 `<-- look here!"
See the manpages for 'tput(1)' and 'terminfo(4)' for more information!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 06:20 AM
тАО08-10-2006 06:20 AM
Re: What does this do?
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
I think I see where some of my characters come from but it is confusing.
Thanks again,
Greg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 06:30 AM
тАО08-10-2006 06:30 AM
Re: What does this do?
The really dumb part about all of this is that it is much easier to do "tput 10 20" than it is to actually figure out the sequence and hard-code it. Some programmer actually had to work harder to do something dumber. This is probably a 3 whacks with a baseball bat issue but feel free to add additional whacks if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-10-2006 07:08 AM
тАО08-10-2006 07:08 AM
Re: What does this do?
I changed the line to "tput cup 10 20" and it works.
Thanks again,
Greg