- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: posix shell and tilde substitution
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
05-11-2004 04:34 AM
05-11-2004 04:34 AM
posix shell and tilde substitution
- when running /sbin/sh on 11.11:
cd ~smith
/sbin/sh: ~smith: not found.
- when running /sbin/sh 10.20:
cd ~smith
changes to the home directory listed for account smith in the NIS passwd file.
/usr/bin/sh on 11.11 does correctly change the directory.
I thought /sbin/sh was a superset of /usr/bin/sh. Why doesn't /sbin/sh on 11.11 expand the ~smith to the home directory listed for smith in the NIS passwd file? It works correctly for accounts that are in the local /etc/passwd file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 04:48 AM
05-11-2004 04:48 AM
Re: posix shell and tilde substitution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 04:50 AM
05-11-2004 04:50 AM
Re: posix shell and tilde substitution
I tested with both the shells, it works fine.
For HPUX 11.00
# pwd
/
# /sbin/sh
#
#
# cd ~bharat
# pwd
/home/bharat
#
#
# /usr/bin/sh
# cd ~bharat
# pwd
/home/bharat
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:03 AM
05-11-2004 05:03 AM
Re: posix shell and tilde substitution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:09 AM
05-11-2004 05:09 AM
Re: posix shell and tilde substitution
I'm running 11.11. Maybe it worked on 11.0 but changed on 11.11.
The cd to ~accountname fails for all accounts except root if I use /sbin/sh. There is nothing wrong with the user's directories.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:15 AM
05-11-2004 05:15 AM
Re: posix shell and tilde substitution
I don't know - it certainly seems to work for me on 11.11:
root# /sbin/sh
root# cd ~plr
root# pwd
/home/plr
root# /usr/bin/sh
root# cd ~plr
root# pwd
/home/plr
root# uname -a
HP-UX tsws1 B.11.11 U 9000/785 2006183676 unlimited-user license
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:28 AM
05-11-2004 05:28 AM
Re: posix shell and tilde substitution
Could you please provide a cksum listing (or something) of /sbin/sh and /usr/bin/sh on your system? I'd like to do a comparison. Maybe I'm missing a patch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:33 AM
05-11-2004 05:33 AM
Re: posix shell and tilde substitution
228930643 421888 /sbin/sh
# cksum /usr/bin/sh
3767272582 221184 /usr/bin/sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:35 AM
05-11-2004 05:35 AM
Re: posix shell and tilde substitution
Pete?
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:42 AM
05-11-2004 05:42 AM
Re: posix shell and tilde substitution
I am in flow ... !!!
Will take care next time ..
Please discard that one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 05:59 AM
05-11-2004 05:59 AM
Re: posix shell and tilde substitution
Sorry - I answered in your other thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=587517
root# what /sbin/sh
/sbin/sh:
builtin.c $Date: 2002/04/02 01:28:34 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
macro.c $Date: 2002/04/02 01:54:01 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25597)
service.c $Date: 2002/04/02 02:30:15 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
xec.c $Date: 2002/04/02 02:40:43 $Revision: r11.11/3 PATCH_11.11 (PHCO_
25597)
main.c $Date: 2001/05/16 04:21:54 $Revision: r11.11/1 PATCH_11.11 (PHCO
_23871)
arith.c $Date: 2002/04/02 01:24:24 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25597)
assign.c $Date: 2002/04/02 01:19:14 $Revision: r11.11/2 PATCH_11.11 (PH
CO_25597)
edit.c $Date: 2002/04/02 01:36:24 $Revision: r11.11/2 PATCH_11.11 (PHCO
_25597)
error.c $Date: 2002/04/02 01:39:21 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25597)
growaray.c $Date: 2002/04/02 01:42:31 $Revision: r11.11/2 PATCH_11.11 (
PHCO_25597)
history.c $Date: 2002/04/02 01:46:03 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
io.c $Date: 2002/04/02 01:48:55 $Revision: r11.11/2 PATCH_11.11 (PHCO_2
5597)
streval.c $Date: 2002/04/02 02:32:42 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
strmatch.c $Date: 2001/05/16 04:21:54 $Revision: r11.11/1 PATCH_11.11 (
PHCO_23871)
test.c $Date: 2002/04/02 02:36:24 $Revision: r11.11/2 PATCH_11.11 (PHCO
_25597)
vi.c $Date: 2002/04/02 02:38:28 $Revision: r11.11/2 PATCH_11.11 (PHCO_2
5597)
$Revision: @(#) all CUP11.11_BL2002_0414_1 PATCH_11.11 PHCO_25597
Sun Apr 14 01:47:56 PDT 2002 $
Version M-11/16/88f
$ B.11.11_LR Feb 8 2002 01:56:21 $
$ Version_11.11 Apr 12 2002 08:31:48 $
root# what /usr/bin/sh
/usr/bin/sh:
builtin.c $Date: 2002/04/02 01:28:34 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
macro.c $Date: 2002/04/02 01:54:01 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25597)
service.c $Date: 2002/04/02 02:30:15 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
xec.c $Date: 2002/04/02 02:40:43 $Revision: r11.11/3 PATCH_11.11 (PHCO_
25597)
main.c $Date: 2001/05/16 04:21:54 $Revision: r11.11/1 PATCH_11.11 (PHCO
_23871)
arith.c $Date: 2002/04/02 01:24:24 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25597)
assign.c $Date: 2002/04/02 01:19:14 $Revision: r11.11/2 PATCH_11.11 (PH
CO_25597)
edit.c $Date: 2002/04/02 01:36:24 $Revision: r11.11/2 PATCH_11.11 (PHCO
_25597)
error.c $Date: 2002/04/02 01:39:21 $Revision: r11.11/2 PATCH_11.11 (PHC
O_25597)
growaray.c $Date: 2002/04/02 01:42:31 $Revision: r11.11/2 PATCH_11.11 (
PHCO_25597)
history.c $Date: 2002/04/02 01:46:03 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
io.c $Date: 2002/04/02 01:48:55 $Revision: r11.11/2 PATCH_11.11 (PHCO_2
5597)
streval.c $Date: 2002/04/02 02:32:42 $Revision: r11.11/2 PATCH_11.11 (P
HCO_25597)
strmatch.c $Date: 2001/05/16 04:21:54 $Revision: r11.11/1 PATCH_11.11 (
PHCO_23871)
test.c $Date: 2002/04/02 02:36:24 $Revision: r11.11/2 PATCH_11.11 (PHCO
_25597)
vi.c $Date: 2002/04/02 02:38:28 $Revision: r11.11/2 PATCH_11.11 (PHCO_2
5597)
$Revision: @(#) all CUP11.11_BL2002_0414_1 PATCH_11.11 PHCO_25597
Sun Apr 14 01:47:45 PDT 2002 $
Version M-11/16/88f
$ B.11.11_LR Feb 8 2002 01:56:21 $
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 06:29 AM
05-11-2004 06:29 AM
Re: posix shell and tilde substitution
Thanks All!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2004 07:57 AM
05-11-2004 07:57 AM