- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: csh terra incognita
Operating System - HP-UX
1753521
Members
4854
Online
108795
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-01-2004 09:13 PM
тАО12-01-2004 09:13 PM
csh terra incognita
Hi,
this is a bit daft.
A user asked me if he could define an alias so that he could pass parameters.
I replied that to achieve this he would have to define a shell function.
To show him how easily this would be done I defined one that fullfilled his needs in a Bourne shell.
Then I found out that this user's login shell was a C shell, and I told him that he would have to place his definition in $HOME/.login or $HOME/.cshrc.
What followed was a bit of an embarrassement since I'm not into csh compatibles at all.
I was pretty bemused to not have found any reference to function definitions in the manpage of csh, nor in my O'Reilly Unix in a Nutshell desktop reference.
I cannot believe that csh doesn't have a notion of functions.
Can this really be, or have I overlooked it?
Rgds.
Ralph
this is a bit daft.
A user asked me if he could define an alias so that he could pass parameters.
I replied that to achieve this he would have to define a shell function.
To show him how easily this would be done I defined one that fullfilled his needs in a Bourne shell.
Then I found out that this user's login shell was a C shell, and I told him that he would have to place his definition in $HOME/.login or $HOME/.cshrc.
What followed was a bit of an embarrassement since I'm not into csh compatibles at all.
I was pretty bemused to not have found any reference to function definitions in the manpage of csh, nor in my O'Reilly Unix in a Nutshell desktop reference.
I cannot believe that csh doesn't have a notion of functions.
Can this really be, or have I overlooked it?
Rgds.
Ralph
Madness, thy name is system administration
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2004 09:39 PM
тАО12-01-2004 09:39 PM
Re: csh terra incognita
Strange, revisiting my O'Reilly reference on the csh I read that in csh aliases (or should be alii, to stay Latin-proof?) could reference command line arguments.
If that's the case I can see that there is a lesser urge for functions in csh unlike the bourne compatibles.
But grouping reusable code blocks in functions still seems cleaner to me.
If that's the case I can see that there is a lesser urge for functions in csh unlike the bourne compatibles.
But grouping reusable code blocks in functions still seems cleaner to me.
Madness, thy name is system administration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2004 12:00 AM
тАО12-02-2004 12:00 AM
Re: csh terra incognita
Hi
If you can do it
www.shelldorado.com
will have it
Steve Steel
If you can do it
www.shelldorado.com
will have it
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Tags:
- shelldorado
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-02-2004 12:26 AM
тАО12-02-2004 12:26 AM
Re: csh terra incognita
Not quite,
also the csh-like references at shelldorado
aren't overly expressive as far as the existence of user defined functions are concerned.
However, for the task given the csh sort of aliasing is quite sufficient.
It was merely something trivial as processing of args.
e.g.
% alias ping '/usr/sbin/ping \!$ -n \!^'
% alias
ping /usr/sbin/ping !$ -n !^
% ping 3 localhost
PING localhost: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=1. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=2. time=0. ms
----localhost PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
also the csh-like references at shelldorado
aren't overly expressive as far as the existence of user defined functions are concerned.
However, for the task given the csh sort of aliasing is quite sufficient.
It was merely something trivial as processing of args.
e.g.
% alias ping '/usr/sbin/ping \!$ -n \!^'
% alias
ping /usr/sbin/ping !$ -n !^
% ping 3 localhost
PING localhost: 64 byte packets
64 bytes from 127.0.0.1: icmp_seq=0. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=1. time=0. ms
64 bytes from 127.0.0.1: icmp_seq=2. time=0. ms
----localhost PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
Madness, thy name is system administration
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP