- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- korn shell read statement
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
Forums
Discussions
Discussions
Discussions
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
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
01-18-2005 09:19 AM
01-18-2005 09:19 AM
We have a korn shell script that adds users to the system. This script takes a social security number(ssn) and reads a DB and then parses a user name from the obtained info. Next the operator is supposed, and was, prompted for a y/n answer to a question printer by the read statement. i.e. -
read stumenu?"Allow access to stuprod menu option? (y/n) [Y]:"
When this script runs now it bypasses the read statement.
Any ideas?
Tom Wallin
Solved! Go to Solution.
- Tags:
- ksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 01:41 PM
01-18-2005 01:41 PM
Re: korn shell read statement
I would start by comparing the 'env' output for both environments (if you still have access to the old setup) or just carefully glance over the current one making sure all reference are still valid. Maybe a tool failed to come over execute with -x to see the script flow? Maybe an echo or two to make sure intermediate values are as expected? If need be, consider sharing the script with us (use an attachement?)
good luck,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 02:00 PM
01-18-2005 02:00 PM
Re: korn shell read statement
I will attach the scripts tomorrow morning.
Tom wallin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 09:52 PM
01-18-2005 09:52 PM
Re: korn shell read statement
use set -x to debug the script and see if it bypasses for some reason your read statement.
greetings,
Michael
ps. please use allways the same login. Otherwise you confuse people. Also you can not assign points if you are not the author of the thread.
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 01:30 AM
01-19-2005 01:30 AM
Re: korn shell read statement
Tom Wallin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 01:46 AM
01-19-2005 01:46 AM
Re: korn shell read statement
you are not running that script by any chance as crontab job or in the background?
Can you post the lines with the debugging output?
thanks,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 02:06 AM
01-19-2005 02:06 AM
Re: korn shell read statement
The script "newuser" does some stuff and then runs script "user_add". User_add does the bulk of the task. At the bottom of user_add, inside an awk cmd a system cmd runs a compiled DB script "ccuid.4ge". I am a little unsure of the environments of such a sequence of calls.
Attached are the scripte, not ccuid.4ge.
I had not kept my runs with the -x. I am going to try calling user_add from newuser without the "." and with -x and see what the difference might be.
Tom Wallin
p.s. it looks like I can only attach one file at a time. I will respond again with the second script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 02:07 AM
01-19-2005 02:07 AM
Re: korn shell read statement
TW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2005 03:32 AM
01-19-2005 03:32 AM
SolutionThat overrules the first line with the -x.
Usually on call of a subscript a new shell is started and no values are returned. However when started by . changes on variables in the subscript have an impact on the calling script.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 05:17 AM
01-20-2005 05:17 AM
Re: korn shell read statement
Thanks to all,
:-)
Tom Wallin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2005 05:31 AM
01-20-2005 05:31 AM
Re: korn shell read statement
I am happy to hear of your success. It is a nice policy here to assign points to those who tried to help. Please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
thanks,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2005 02:36 AM
01-24-2005 02:36 AM
Re: korn shell read statement
Tom Wallin