- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scripting question
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
тАО12-10-2002 05:39 AM
тАО12-10-2002 05:39 AM
I have a variable x.
I read the input for it. Do some stuff and ask for another x.
Can I somehow display the current value of the x and have them back space over some random number of characters and put that as the "new" value?
An example is:
I prompt the user to enter a long number "x":
1098765432123456789
What I would like to do is after processing "x", print out "x" and allow them to backspace over 89 for value 90, without keying in the entire variable again.
i.e. 1098765432123456789 -> 1098765432123456790
Any ideas?
Thanks,
Brian
<*(((>< er
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 05:51 AM
тАО12-10-2002 05:51 AM
Re: Scripting question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 06:03 AM
тАО12-10-2002 06:03 AM
Re: Scripting question
typeset test1=123456789
read test2?"${test1}: "
echo $test1
echo $test2
In the script above, the test1 variable is used as a prompt. You can select, cut and paste using your mouse, then make appropriate edits. Then test2 gets the value you enter.
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 06:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 10:44 AM
тАО12-10-2002 10:44 AM
Re: Scripting question
You were correct when you said the script was not simple, but it does exactly what I was looking for.
Thanks for the quick responses,
Brian
<*(((>< er
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2002 07:23 AM
тАО12-11-2002 07:23 AM
Re: Scripting question
Basically it takes the length of the original and the length of the new input, and uses that to create a "prefix" of the numbers that won't change, appending the new numbers to that.
Fred
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2002 07:24 AM
тАО12-11-2002 07:24 AM