![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| $ . ./.profile | MikeBigjohn | UNIX for Dummies Questions & Answers | 3 | 09-14-2007 04:20 AM |
| Where can I read about the difference between "..profile" and ".profile" | zorrokan | UNIX for Dummies Questions & Answers | 2 | 09-05-2007 01:35 AM |
| Difference between .profile and .~/.profile | maneesh mehta | SCO | 3 | 12-14-2005 04:35 AM |
| changed .profile but didnt ./.profile, yet reflected changes | yls177 | UNIX for Dummies Questions & Answers | 4 | 12-05-2002 11:21 AM |
| why i have local.profile, local.cshrc,local.login instead of .profile, .login ? | abidmalik | UNIX for Dummies Questions & Answers | 5 | 08-27-2002 01:47 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
ksh and .profile
hi,
I have the following in my .profile file: Code:
21 set -u
22 trap "echo 'logout'" 0
23
24
25 EDITOR=vi
26 export EDITOR
27
28 export ENV=x.tm
And x.tm just contains Code:
echo hello world In addition, if I manually do .profile, then I get Code:
$ .profile .profile[11]: setenv: not found logout Thanks. |
|
||||
|
Quote:
Code:
8 then
9 eval ` tset -s -Q -m ':?hp' `
10 else
11 eval ` tset -s -Q `
12 fi
Thanks. |
|
||||
|
Quote:
ok, so .profile is not executed when I type ksh and go to the korn shell. But I would have thought that if I then did .profile in the korn shell, it will at least run that script (which looks like below) Code:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
tabs
PATH=$PATH:.
set -u
trap "echo 'logout'" 0
EDITOR=vi
export EDITOR
export ENV=x.tm
However, I get: Code:
$ . ./.profile ksh: setenv: not found I just don't know where this setenv is coming from. It is not in my script! thanks |
|
|||||
|
Notice that I said "tset will notice that and output setenv statements for you. The backticks try to run the output from tset." That is what is happening. What effect did expect from
eval ` tset -s -Q ` Code:
$ $ $ cat script1 #! /usr/bin/ksh echo setenv this that exit 0 $ $ $ cat script2 #! /usr/bin/ksh eval `./script1` exit 0 $ $ $ $ ./script1 setenv this that $ ./script2 ./script2: setenv: not found $ |
|
||||
|
Quote:
![]() |
![]() |
| Bookmarks |
| Tags |
| unix commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|