- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- newuser script help
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
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
08-14-2001 11:00 AM
08-14-2001 11:00 AM
I have a script that I run to add new users but if the username has a double letter, ie mccullou for Mccullou, it drops the second letter.
Any suggestions? By the way, I have attached it for your review.
Suggestions are appreciated,
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2001 11:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2001 11:11 AM
08-14-2001 11:11 AM
Re: newuser script help
Use this in you script
user= `echo $1 |tr "[:upper:]" "[:lower:]"`
this will convert $1=username in to lowercase and will not remove any character.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2001 11:24 AM
08-14-2001 11:24 AM
Re: newuser script help
The problem is the '-s' option to 'tr' You are squeezing multiple instances of the characters you are translating to a single instance.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2001 11:29 AM
08-14-2001 11:29 AM
Re: newuser script help
I admit it, I'm not a script guru, far from it, but I love to tinker. Although, I have not had time to try you script, I did look at it.
I think your problem may be stemming from the uniq command in line 10. Check your man pages, I think you may need to add an option to get it to recognize double characters.
Or you could alway use SAM ; )
Hope this helps,
K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2001 05:15 AM
08-15-2001 05:15 AM
Re: newuser script help
As said before, delete the tr 's option "-s" in the following line:
user=`echo $1 | tr "[A-Z]" "[a-z]"
and it will work !
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2001 03:04 AM
08-20-2001 03:04 AM
Re: newuser script help
I was not able to login earlier due to login problems with the HP authentication server.
Nickd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2001 03:31 AM
08-20-2001 03:31 AM
Re: newuser script help
You can use typeset
typeset -u $UPPERCASE=$LOWERCASE
...BPK...