- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- C-Shell programming
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
01-23-2001 10:41 PM
01-23-2001 10:41 PM
C-Shell programming
. catiaenv /usr/home/USER.dcls
The point and the blank make me big troubles.
Thanks
Bettina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 11:18 PM
01-23-2001 11:18 PM
Re: C-Shell programming
normally, when you execute a shell program, a subshell is created in which to execute it. therefore, if you define variables in the program, they are only good for as long as the program is executing( when the program in done, you return to the current shell's environment ). If you want to have the shell program executed in the current shell ( the defined vars will be good for the current shell's env. ) , use the "dot"command :
#. scriptname
I hope this helps you!
Federico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2001 11:49 PM
01-23-2001 11:49 PM
Re: C-Shell programming
the '.' command in Korn, Bourne or Posix shell means that the following argument has to be executed in the same shell as the calling shell, not by forking another subshell.
The C shell equivalent is 'source filename'.
You have to make sure that the content of the argument file can be interpreted by the C Shell, which would be surprising.
'Sourcing' a document is usually done to setup some environment variables (like in your .profile or .kshrc files) and the syntax for setting such variables differ between C shell and Bourne, Korn or Posix Shells.
in csh:
setenv VARNAME value
in sh and ksh:
export VARNAME=value
Hope this helps,
Best regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2001 12:07 AM
01-24-2001 12:07 AM
Re: C-Shell programming
the line
. catiaenv /usr/home/USER.dcls
is bourne/korn shell syntax.
It is used to source environment into the current shell.
In c-shell the equivalent is the function source.
The source function uses the next argument as a file for input.
So the problem i see is that your line
. catiaenv /usr/home/USER.dcls
will execute the program/script catiaenv with a parameter and i don't know how to make this in c-shell.
Also it may be the case that the catiaenv itself uses bourne/korn shell syntax for setting environment variable which also differs from c-shell syntax ie:
Bourne/korn-shell: export VAR=VALUE
C-shell: setenv VAR VALUE
Hope this gives you a litte light.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2001 05:45 AM
01-24-2001 05:45 AM
Re: C-Shell programming
I know what your trying to do, and it will NOT work as is. CATIA looks for the users home directory to be /bin/ksh (IBM AIX default shell). The CATIA environment files are written for borne and korne shell. If you want to have a cshell login for these users and still access those files, they need to be copied and modified for cshell.
There are many differences in the way the shells set and define variables, use conditional statements, etc...
I.E.
# C-Shell
setenv CATCUST /home/catadm
# Borne, Korne, POSIX
CATCUST=/home/catadm
export CATCUST
The latter case is how the CATIA environment and declaration files are build.
I would NOT recommend that you pursue developing these scripts in c-shell because there are so many dependancies on the shell and the environment variables that you would be rewriting a whole lot of catia scripts (100's or more).
Best thing to do with CATIA is to keep the users in either ksh or sh for their default shell.
Regards,
Shannon