Operating System - HP-UX
1758153 Members
3119 Online
108868 Solutions
New Discussion юеВ

export command is not working

 
SOLVED
Go to solution
Yarok
Regular Advisor

export command is not working

Hello,

On HP-UX b.11.11 (C-8000), I try to run export command i.e export TERM=vt100.

Please advice,

Yaron
10 REPLIES 10

Re: export command is not working

so whats not working then?

if you set a TERM environment variable as you showed, it just sets it in the current shells environment - it won't actually change anything - what are you expecting to happen? Maybe change the settings for the terminal? If so you should run the "tset" command after setting the environment variable...

export TERM=vt100
tset



HTH

Duncan

I am an HPE Employee
Accept or Kudo
щ╗ЮчЗГ
Valued Contributor

Re: export command is not working

The export command should be working 11.11. Please post the error message here
Man's mind, once stretched by a new idea, never regains its original dimensions
Yarok
Regular Advisor

Re: export command is not working

even if I try: man export it says " no manual entry for export "
Yarok
Regular Advisor

Re: export command is not working

error message:

export: Command not found
Solution

Re: export command is not working

export is not actually a command, it is a shell built-in for the sh and ksh shells...

I gues you are using another shell such as csh or tcsh which doesn't have export... why you would want to use these terrible shells I don't know, but the equivalent to "export TERM=vt100" in csh would be "setenv TERM vt100"

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Dennis Handly
Acclaimed Contributor

Re: export command is not working

>even if I try: man export it says "no manual entry for export"

As Duncan said, try "man ksh" or "man sh-posix" and look for "export".
Yarok
Regular Advisor

Re: export command is not working



Usually, I uses tcsh or sh shells.

1. How can I know what shell Im running with (I mean, is there any command that displays the shell)?

2. what are the benefits of ksh over others tcsh or sh in my case?

BR,

Yaron
Dennis Handly
Acclaimed Contributor

Re: export command is not working

>Usually, I use tcsh or sh shells.

export works in sh/ksh, bash, etc

>1. How can I know what shell I'm running?

Typically you would just know. :-)
You can "echo $SHELL" but that's your login shell and can be changed.
I've found that if you try to execute a bogus command, the name of the shell is mentioned.
http://h30499.www3.hp.com/t5/Languages-and-Scripting/shell/m-p/4754063#M29768

>2. what are the benefits of ksh over others tcsh or sh in my case?

There is something terribly wrong if you mention tcsh and sh together, since they don't get along. :-)
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
http://h30499.www3.hp.com/t5/Languages-and-Scripting/Which-Shell-is-best/m-p/4783404#M30508
http://h30499.www3.hp.com/t5/Languages-and-Scripting/KSH-to-CSH-conversion-not-working/m-p/5274603#M41617

Basically sh/ksh are nearly identical and are real shell.
tcsh is derived from the scummy C shell.

Yarok
Regular Advisor

Re: export command is not working

Many thanks, I followed the links and informed myself (some with mine old thread :))

BTW, I probably type tcsh to get a comfortable env, so I couldn't run export.

BR,

Yaron