Operating System - Tru64 Unix
1752810 Members
5919 Online
108789 Solutions
New Discussion

Help needed in scripts execution

 
SOLVED
Go to solution
Zishan
Regular Advisor

Help needed in scripts execution

Hi all,
I am trying to install oracle database on HP Tru 64 bit. For pre requisites I created Oracle user and edit the .login file with "umask 022" mention in the installation guide.
Now I am struck on a point that:

10. To run the shell startup script, enter one of the following commands:
■ Bash shell:
$ . ./.bash_profile
■ Bourne or Korn shell:
$ . ./.profile
■ C shell:
% source ./.login

Any body guide me how could I able to execute these scripts ?
where these scripts are located ?
regards
3 REPLIES 3
Martin Moore
HPE Pro
Solution

Re: Help needed in scripts execution

They're in the user's home directory. You might not see them with "ls" because files whose names start with a period are "hidden" files. If you do "ls -a", you'll see them.

To run them, simply run the command exactly as shown, excluding the first $ or % character, which is indicating a command prompt. For example, if running the Korn shell, enter:

. ./.profile

Note the space between the first two periods. The first period says to run the following script, while "./.profile" indicates the location of the script. This assumes that your current directory is set to the user's home directory.

If you're not even sure which shell you're using, enter "echo $SHELL" to find out.

Martin

I work for HPE
A quick resolution to technical issues for your HPE products is just a click away HPE Support Center
See Self Help Post for more details

Accept or Kudo

Arturo Galbiati
Esteemed Contributor

Re: Help needed in scripts execution

Hello,
prior to execute the profile or login file accorning to your shell, take care that the file should be executable by the user.
In ksh type chmod u+x .profile
Rgds,
Art
Steven Schweda
Honored Contributor

Re: Help needed in scripts execution

> prior to execute the profile or login file
> accorning to your shell, take care that the
> file should be executable by the user.

This would be important if you were
_executing_ ",profile" or ".login" as shell
scripts, but that's not what's happening.
". ./.profile" or "source ./.login" tells the
shell to _read_ commands from that file,
_not_ to execute it as a shell script (in a
separate process). Thus, read permission is
needed, but execute permission is not.

But what do I know? Try it, and see what's
true.