- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TERM - Environment Variable
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
04-20-2004 08:22 AM
04-20-2004 08:22 AM
TERM - Environment Variable
At present, we have 2 different kind of terminals, of which one of them support vt100 and the other support hpterm.
By default, when a admin user logon to the system, the TERM value is vt100.
venus:oracn2 > echo $TERM
vt100
What I have done is, I have created a file and inserted the following lines in it:
setenv TERM hpterm
clear
When I executed the file, the system is responding witht he following error message:
venus:oracn2 27> ./envterm
./envterm: setenv: not found.
But when I executed the follwoing command directly, it works fine:
setenv TERM hpterm
clear
What am I doing wrong in executing the file?
Thanks & regards,
Nikee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:26 AM
04-20-2004 08:26 AM
Re: TERM - Environment Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:30 AM
04-20-2004 08:30 AM
Re: TERM - Environment Variable
export TERM=hpterm
regards
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:31 AM
04-20-2004 08:31 AM
Re: TERM - Environment Variable
without a !#/usr/bin/csh line your script will run as posix, which does not understand setenv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:32 AM
04-20-2004 08:32 AM
Re: TERM - Environment Variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:32 AM
04-20-2004 08:32 AM
Re: TERM - Environment Variable
Have you tried evaluating TERM in your profile.
-----
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
-----
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:38 AM
04-20-2004 08:38 AM
Re: TERM - Environment Variable
I have entered the following lines in the file:
#!/usr/bin/csh
setenv TERM hpterm
clear
I could able to execute the file with out any problems, but when I ran the following command I still see the same value for TERM i.e. vt100
venus:oracn2 24> echo $TERM
vt100
It shoud suppose to show me as hpterm instead as vt100 !!!!!!!!
Regards,
Nikee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 08:44 AM
04-20-2004 08:44 AM
Re: TERM - Environment Variable
Your best course of action is to create a condition in your .profile that sets determines your TERM. As mentioned above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:35 PM
04-20-2004 05:35 PM
Re: TERM - Environment Variable
#!/usr/bin/sh
export TERM=vt100
clear
And it should be executed as follows
/home/kaps>. script1 #Please note the "DOT" in front
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 09:31 PM
04-20-2004 09:31 PM
Re: TERM - Environment Variable
if you are running a csh / tcsh Shell, you must call
source script
to get the commands of script 'inline'
(not . script - this is for POSIX shells).
Otherwise the change of the environment
will not survive the newly created process...
If you want the changed value as a default,
put the commands in your ~/.chsrc
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 10:05 PM
04-20-2004 10:05 PM
Re: TERM - Environment Variable
1- when you run a script you have to specify the interpreter
2- all the environment settings made into a script will remain _into_ the script because it's run into another shell (which inherits some properties and envs of the father shell) invoked on the first line, and that shell will close automatically at the end of the script
3- to run a script in the current shell and not in another one you should
3a- write it using the current shell commands
3b- invoke it using the command "source" for [t]csh; or ". " note the blank after the dot, for "bourne shells" as sh/ksh/ash; latest bash supports both methods
After doing that, please, look at http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
it could be a starting point
Pax, R.