I am currently trying to tell /bin/ksh to behave like a login shell. I am invoking it from an interactive shell. In the documentation is stated, that calling it with
it should behave like a login shell, work 1st on /etc/profile, ~/.profile and so on.
I tried that with different quotations but had no success, usually nothing happened or session closed etc..
Doku: pSeries and AIX Information Center
I then found a hint on some page that invoking it with a small C-program should help and indeed it worked:
Problem with this is, it has to be compiled for different versions of AIX. So I'd rather like a solution solely with shell commands if possible.
Sadly I found no other option in the man page for ksh to tell it to read .profile ie. behave like a login shell. For pdksh, bash, (ksh93 I think too) etc. there are such options, but I can't use any other but plain /bin/ksh in this case.
Thanks for any hint in forward.
Last edited by zaxxon; 04-20-2009 at 05:52 AM..
Reason: syntax
Hi,
A very basic query.
I am working on two different UNIX servers and I see different behaviours for my user id. This has to be a setting in the .profile, but I can't seem to find where :confused:
So, in one server if I type echo $XYZDD (a random variable), I get a blank line with no... (2 Replies)
I need a shell script using expect to login to couple of remote servers and read "crontab -l -u <username>" & "cat /etc/rc.local" & "df -h" and able to create output into a file saved locally with hostname.crontab & hostname.rc.local & disk.status. I can supply a file as list of hostname or IP... (4 Replies)
Hello All
Nice to meet you all here in this forum,
it's my 1rst time here
i'm asking about a little issue that i face
i added a ksh script that echo " please insert your name " and store the output to a login.log file.
the script is working fine with normal telnet
but Xstart is not working... (8 Replies)
Hello,
I am new to this forums and this is my first "asking help" message!
i have 2 problems:
1- for unknown reasons the "source" command is not avalable in my system (UBUNTU). i can't either see it in my bin directory!
2- again for unknown reasons the "login.cl" file in the home... (0 Replies)
Hi,
I have small script written in korn shell. When it is called from different script, its dumping core, but no core dump when we run it standalone.
And its not dumping core if we run the script using "/bin/sh" instead of "ksh"
Can some body please help me how to resolve this issue.
... (9 Replies)
Hi Guys,
while executing the following command : print "-ABC" is giving following error :
ksh: print: bad option(s)
I cannot use echo for some other reasons, so any other option ? (2 Replies)
Hello fellow *nix users!
I am a bit confused how could I get an environment of a "fresh/clean" login shell, that is, the environment at that moment when user has started e.g. a new terminal/console or so.
So this is the sequence of actions I should be able to do in a single shell session:
... (6 Replies)
I have created a ksh shell script and used it as a login shell for a user.
</etc/passwd>
lramirev:x:111:200:Luis:/export/home/menush:/usr/local/menush/menush
My shell script is like this:
</usr/local/menush/menush>
#!/bin/ksh
#
if ]
then
. $HOME/.profile
fi
... (8 Replies)
Hi
I know from reading O Riley's Classic Shell Scripting' that the .profile file is " the shells configuration file" but I am unable to find a reference to what "..profile" means. I have searched on the net, Sams Teach Yourself Unix, Unix Visual Quickstart Guide and Linux in a Nutshell. I have... (2 Replies)
Hi
I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message
No utpmx entry: you must exec "login" from lowest level "shell" :confused:
What i want is: open various... (0 Replies)