- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- why "!" is not working?
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
Discussions
Discussions
Forums
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
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
тАО12-11-2009 01:36 PM
тАО12-11-2009 01:36 PM
why "!" is not working?
1 ls -lrt .sh*
2 cat /etc/passwd | grep muser1
3 history
4 !1
5 history 1
6 history 2
7 man history
8 1!
9 ksh
10 ls -lrt
11 history
$ !1
ksh: !1: not found
thanks in advance.
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2009 02:04 PM
тАО12-11-2009 02:04 PM
Re: why "!" is not working?
Because you're using ksh, not csh?
man ksh
http://docs.hp.com/en/B2355-60130/ksh.1.html
Compare:
man csh
http://docs.hp.com/en/B2355-60130/csh.1.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2009 04:00 PM
тАО12-11-2009 04:00 PM
Re: why "!" is not working?
$ whoami
user1
$ echo $SHELL
/usr/bin/csh
$ !!
su: !!: not found.
$ hostname
server1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-11-2009 04:52 PM
тАО12-11-2009 04:52 PM
Re: why "!" is not working?
If you say so. But then please explain why
your error message said "ksh: !1: not found".
Are my eyes failing me, or do I see a "k" in
there, and not a "c"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2009 08:18 PM
тАО12-12-2009 08:18 PM
Re: why "!" is not working?
This tells you nothing about the actual shell you are running. SHELL is set when you login but is not changed when you type something like ksh. These are the commands:
echo $0
ps -f
These will show what you are actually running.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2009 11:51 PM
тАО12-12-2009 11:51 PM
Re: why "!" is not working?
Or "ps -fp $$".
Or if you are running a real shell, to get all of your trees:
UNIX95=EXTENDED_PS ps -H -fu $LOGNAME