- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Password hidden
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
09-28-2005 06:37 PM
09-28-2005 06:37 PM
I am starting to write a script about to create a user. It contains account password and path name. My questions are:
1) If I ask the user to set the password, the output will display on the screen? How to avoid to display? My srcipt is:
printf "Set the password: "
read temp
2) Also when the user enter the path namee likes /home/temp/, but I want to cut character "/" for the output, so that the output likes home/temp? Do anyone have an idea to do it?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2005 06:50 PM
09-28-2005 06:50 PM
Re: Password hidden
printf "Set the password: "
stty -echo
read temp
stty echo
read home
home1=${home#/} --> will give home/temp/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2005 06:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2005 08:24 PM
09-28-2005 08:24 PM
Re: Password hidden
thanks your help first, now if the user type /home/temp/, and I want the output likes --> home/temp
how do i do?
Thx again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 12:09 AM
09-29-2005 12:09 AM
Re: Password hidden
Will give you what you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 12:12 AM
09-29-2005 12:12 AM
Re: Password hidden
usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 06:34 AM
09-29-2005 06:34 AM
Re: Password hidden
I don't know what your scripting skill level is do don't be afraid to ask what something means or the though process behind it.
#assign the string to a variable
DIR=$1
if [ `echo $DIR | cut -c 1` - \/ ]
then
DIR=`echo $DIR | cut -c 2-`
fi
echo input was $1 and it converted to $DIR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2005 08:50 PM
09-29-2005 08:50 PM
Re: Password hidden
print ${Home_Directory#/}
HTH
Art