The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Metacharacters analysis gehlnar Shell Programming and Scripting 3 02-13-2009 10:19 AM
It’s all “Pattern Analysis”? iBot Complex Event Processing RSS News 0 11-20-2008 02:00 PM
Regarding stack analysis vpraveen84 High Level Programming 7 06-30-2008 07:08 PM
AWK script: decrypt text uses frequency analysis SerJel Shell Programming and Scripting 4 11-27-2007 03:16 AM
Catalina Analysis Burhan SUN Solaris 2 04-30-2007 05:14 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-05-2009
ramky79 ramky79 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
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 (permalink)  
Old 08-05-2009
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,972
. 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
Code:
PROGRAMPATH=qqwert
ASDF=stuff
MAXLINES=7
...

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 (permalink)  
Old 08-05-2009
Bill L. Bill L. is offline
Registered User
  
 

Join Date: Aug 2009
Location: richmond VA
Posts: 3
db2 CLP - command line processor - should be on that region.

type
=> 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 DATABASE for help on the CATALOG DATABASE command
? 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 =>
  #4 (permalink)  
Old 08-06-2009
mac4rfree mac4rfree is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 170
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

Code:
. /db2home/db2dap1/sqllib/db2profile

to get the db2 prompt.
  #5 (permalink)  
Old 08-06-2009
Bill L. Bill L. is offline
Registered User
  
 

Join Date: Aug 2009
Location: richmond VA
Posts: 3
macr4free - you are correct - I was assuming that line was in the users .profile

thank you.
  #6 (permalink)  
Old 08-09-2009
ramky79 ramky79 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 56
Thank you for the response.
thanks again
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0