Analysis of a script

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Analysis of a script
# 1  
Old 08-05-2009
Analysis of a script

what does this line in a script mean??
I have tried to give it at the command prompt and here is what it returns
ksh: /db2home/db2dap1/sqllib/db2profile: not found.

. /db2home/db2dap1/sqllib/db2profile

i have tried the same thing for my home directory too and the result is the same

. /home/ramky

Result: ksh: /home/ramky: not found.
# 2  
Old 08-05-2009
. means to source a script -- that is, run it in the current shell instead of making a new shell and running it inside. A profile file is usually a script containing only statements like

and whatever other global values need to be set in your shell.

So its expecting a file containing a set of global values needed to run the rest of the script and not finding it.
# 3  
Old 08-05-2009
db2 CLP - command line processor - should be on that region.

=> db2

should see something like
(c) Copyright IBM Corporation 1993,2002
Command Line Processor for DB2 SDK 8.2.6

You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd

For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG for help on all of the CATALOG commands.

To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 =>
Bill L.
# 4  
Old 08-06-2009
As Suggested by Bill, it is the path where the DB2 CLP is present.
I think you will not get db2 prompt if run db2 command.
You need to run the above command
. /db2home/db2dap1/sqllib/db2profile

to get the db2 prompt.
# 5  
Old 08-06-2009
macr4free - you are correct - I was assuming that line was in the users .profile

thank you.
Bill L.
# 6  
Old 08-09-2009
Thank you for the response.
thanks again
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Nmon Analysis

Dear All, I am an performance tester. Now i am working in project where we are using linux 2.6.32. Now I got an oppurtunity to learn the monitoring the server. As part of this task i need to do analysis of the Nmon report. I was completely blank in this. So please suggest me how to start... (0 Replies)
Discussion started by: iamsengu
0 Replies

2. Shell Programming and Scripting

Bash output analysis script

I want to create a script to analyse each output from a task while it is running and launch a sub-function if a specific error message is found at any point or to continue as normal. #!/bin/bash read checker <<< $('Running process') if ; then 'Sub-function' elif "continue as normal" fi (2 Replies)
Discussion started by: 3therk1ll
2 Replies

3. UNIX for Dummies Questions & Answers

Text analysis

Hey Guys, Does anyone know how to count the separate amount of words in a text file? e.g the 5 and 20 Furthermore does anyone know how to convert whole numbers in decimals? Thanks (24 Replies)
Discussion started by: John0101
24 Replies

4. Shell Programming and Scripting

Date and time range extraction via Awk or analysis script?

Hello does anyone know of an awk that will extract log file entries between a specific date and time range, eg: awk '/15\/Dec\/2010:16:10:00/, /15\/Dec\/2010:16:15:00/' access_log but one that works? Or a free command line log file analysis tool/script? I'd like to be able to view... (2 Replies)
Discussion started by: competitions
2 Replies

5. Shell Programming and Scripting

Metacharacters analysis

:confused:Hi , Can someone please advise what is the meaning of metacharacters in below code? a_PROCESS=${0##*/} a_DPFX=${a_PROCESS%.*} a_LPFX="a_DPFX : $$ : " a_UPFX="Usage: $a_PROCESS" Regards, gehlnar (3 Replies)
Discussion started by: gehlnar
3 Replies

6. Programming

Regarding stack analysis

I would like to know how I could do the following : void func(){ int a = 100; b=0; int c = a/b; } void sig_handler (int sig,siginfo_t *info,void *context){ //signal handling function //here I want to access the variables of func() } int main(){ struct sigaction *act =... (7 Replies)
Discussion started by: vpraveen84
7 Replies

7. Shell Programming and Scripting

AWK script: decrypt text uses frequency analysis

Ez all! I have a question how to decrypt text uses letter frequency analysis. I have code which count the letters, but what i need to do after that. Can anybody help me to write a code. VERY NEEDED! My code now: #!/usr/bin/awk -f BEGIN { FS="" } { for (i=1; i <= NF; i++) { if ($i... (4 Replies)
Discussion started by: SerJel
4 Replies

8. Solaris

Catalina Analysis

How can I make analysis for catalina.out (2 Replies)
Discussion started by: Burhan
2 Replies
Login or Register to Ask a Question