HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: a script run through sam, "custom application"...
Operating System - HP-UX
1832585
Members
3207
Online
110043
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
09-12-2002 11:13 AM
09-12-2002 11:13 AM
a script run through sam, "custom application"'s "read variable" command makes the variable a double
Hello,
I was having problems with a new script I created, which will be used in the help desk to create an ID. The first thing the script does is ask for the user ID or UID, so I used a "read" command to get the input. I found out that if you enter soemthing like "srs" or "sa" the variable is read as "srssrs" or "sasa" .. ONLY if the script was executed through SAM Custom Application. Longer entries seem to work, its the short ones that have a problem. It didn't happen all of the time, but it happened most of the time. I tried setting the script to use ksh, sh, no difference. From command line it works perfectly every time.
Here is the script I am testing with:
----------------------------
#!/bin/ksh
echo "enter the text"
read something
echo $something
----------------------------
Here is a sample of the output I get in error:
enter the text
sas
sassas
Press to continue sam...
Anyone have any ideas?
-Ben
I was having problems with a new script I created, which will be used in the help desk to create an ID. The first thing the script does is ask for the user ID or UID, so I used a "read" command to get the input. I found out that if you enter soemthing like "srs" or "sa" the variable is read as "srssrs" or "sasa" .. ONLY if the script was executed through SAM Custom Application. Longer entries seem to work, its the short ones that have a problem. It didn't happen all of the time, but it happened most of the time. I tried setting the script to use ksh, sh, no difference. From command line it works perfectly every time.
Here is the script I am testing with:
----------------------------
#!/bin/ksh
echo "enter the text"
read something
echo $something
----------------------------
Here is a sample of the output I get in error:
enter the text
sas
sassas
Press
Anyone have any ideas?
-Ben
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2002 11:26 AM
09-12-2002 11:26 AM
Re: a script run through sam, "custom application"'s "read variable" command makes the variable a double
Hi
I tested this but I can't reproduce the problem. Is it perhaps something with your terminal emulator. Try to add a line:
echo $something >/tmp/tmpfile
And check what you got in the file.
I tested this but I can't reproduce the problem. Is it perhaps something with your terminal emulator. Try to add a line:
echo $something >/tmp/tmpfile
And check what you got in the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2002 11:47 AM
09-12-2002 11:47 AM
Re: a script run through sam, "custom application"'s "read variable" command makes the variable a double
Leif,
I tried that.. I also changed the script to a while loop so I could play for a while within that sam session...
#!/bin/ksh
while read -r something
do
echo $something
echo $something >> /tmp/testfile.ben
done
the output is:
srssrs
sassas
srssrs
ben
abc
123
srs
sas
Once I typed in "ben" the problem stopped happening..
Also we are using Reflection/X .. HP-UX is 11.00 and the model is a D370
-Ben
I tried that.. I also changed the script to a while loop so I could play for a while within that sam session...
#!/bin/ksh
while read -r something
do
echo $something
echo $something >> /tmp/testfile.ben
done
the output is:
srssrs
sassas
srssrs
ben
abc
123
srs
sas
Once I typed in "ben" the problem stopped happening..
Also we are using Reflection/X .. HP-UX is 11.00 and the model is a D370
-Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2002 12:05 PM
09-12-2002 12:05 PM
Re: a script run through sam, "custom application"'s "read variable" command makes the variable a double
We also tried using this perl script, and get the same problem:
#!/usr/contrib/bin/perl
$uid = "";
$uid =;
printf "$uid";
the output is:
srs
srssrs
Press to continue sam...
Hmmm......
-Ben
#!/usr/contrib/bin/perl
$uid = "";
$uid =
printf "$uid";
the output is:
srs
srssrs
Press
Hmmm......
-Ben
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP