- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Ksh Alias parameters.
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
12-21-2001 07:05 AM
12-21-2001 07:05 AM
Ksh Alias parameters.
If someone has played around with the KSH aliases any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 07:07 AM
12-21-2001 07:07 AM
Re: Ksh Alias parameters.
#l .profile
.profile is an argument
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 07:09 AM
12-21-2001 07:09 AM
Re: Ksh Alias parameters.
Have a look at this doc
http://us-support.external.hp.com/cki/bin/doc.pl/sid=b702515d182dcaee5e/screen=ckiDisplayDocument?docId=200000024670261
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 07:15 AM
12-21-2001 07:15 AM
Re: Ksh Alias parameters.
alias -x lsl = "ls -l |$PAGER"
HTH
--
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 11:38 AM
12-21-2001 11:38 AM
Re: Ksh Alias parameters.
If you define an alias
#10="ls -lR"
Then use
#10 /tmp to list contents of /tmp
Thanks.
Prashant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2001 05:18 PM
12-21-2001 05:18 PM
Re: Ksh Alias parameters.
the error message you get when you try it.
As far as I know, ksh aliases can only be used
as the other posters described, i.e.
alias 'copy=cp'
Now you can say:
copy this that
and it behaves like:
cp this that
Perhaps what you want is to be able to do
something like this:
copy this that
and have it behave like:
cp this that the_other
where "the_other" is hard-coded into the
alias. I don't think ksh aliases can do that.
Perhaps you should set up a function
(subroutine) in your .kshrc or .profile.
Then the function's arguments are
available in $*. Example:
function copy {
cp $* the_other
}
On the other hand, csh aliases can use !* construct.
Example:
alias copy 'cp \!* the_other'
Good luck!