Sponsored Content
Top Forums Shell Programming and Scripting Diff between calling a shell script with ./ and . ./ Post 302548557 by SasDutta on Thursday 18th of August 2011 05:36:20 PM
Old 08-18-2011
Diff between calling a shell script with ./ and . ./

Hi ALL

I have a shell script named setUP in which i am sourcing one variable like

source var_name="CLASSPATH".

When i call it as ./setUP, it does not set the var_name variable. But when i call it like . ./setUP then var_name is set up. What is the difference between this two calls?

Thanks in advance
Sas
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling shell script ?

hi friends, i'm new to unix and straight away i had to start with the script files. I've a script file which gets called from a menu item on a GUI. This script file again calls .awk file, in performing some tasks , which also generates certain files. I modified the files to generate some... (1 Reply)
Discussion started by: Ravi_Kandula
1 Replies

2. Shell Programming and Scripting

Calling Shell Script

Hello Friends, I have bash script on unix server which i want to call from windows server. Basically i want a command line which will call this script on unix server. Any one has any idea regarding this? Help really appreciated!! Thanks, Roshni. (1 Reply)
Discussion started by: onlyroshni
1 Replies

3. Shell Programming and Scripting

Calling shell functions from another shell script

Hi, I have a query .. i have 2 scripts say 1.sh and 2.sh 1.sh contains many functions written using shell scripts. 2.sh is a script which needs to call the functions definded in 1.sh function calls are with arguments. Can some one tell me how to call the functions from 2.sh? Thanks in... (6 Replies)
Discussion started by: jisha
6 Replies

4. Shell Programming and Scripting

Calling another shell script

Hi there, I have an script reading content of a file and runs whatever command is specified there, as follows #!/bin/bash # Supposed to read from a file that commands are listed to be run # when the server starts for initialization CMD_FILE=/myScripts/startup/task2do.txt if ; then ... (2 Replies)
Discussion started by: james gordon
2 Replies

5. Shell Programming and Scripting

calling 'n' number of shell scripts based on dependency in one shell script.

Hello gurus, I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script. i m looking for something like this call 3.1; If 3.1 = "complete" then call 3.2; if 3.2 = ''COMPlete" then call 3.3; else exit The... (1 Reply)
Discussion started by: shashi369
1 Replies

6. Shell Programming and Scripting

Shell script using Diff

Hello - I have a small diff script that checks 2 directories. It reports the difference in count such as wc -l, and also names the different files. How should I get "ERROR: diff found . (host)" - when it actually finds a diff? This is how I have written: #!/bin/bash ... (10 Replies)
Discussion started by: DallasT
10 Replies

7. Shell Programming and Scripting

Time Diff in shell script

Hi all , i am trying to calculate time difference btw the script execution I am using solaris start_time=`date +%s` sleep 2 end_time=`date +%s` duration=`expr $end_time - $start_time` when i try to subtract i get the error line 13: %s - -time : syntax error: operand expected... (3 Replies)
Discussion started by: posner
3 Replies

8. UNIX for Dummies Questions & Answers

Diff between calling a shell script with ./ and . ./

Hi ALL I have a shell script named setUP in which i am sourcing one variable like source var_name="CLASSPATH". When i call it as ./setUP, it does not set the var_name variable. But when i call it like . ./setUP then var_name is set up. What is the difference between this two calls? ... (1 Reply)
Discussion started by: SasDutta
1 Replies

9. Shell Programming and Scripting

serach diff filename in diff location using shell scripting

Hi, I am new to shell scripting. please help me to find out the solution. I need a script where we need to read the text file(consists of all file names) and get the file names one by one and append the date suffix for each file name as 'yyyymmdd' . Then search each file if exists... (1 Reply)
Discussion started by: Lucky123
1 Replies

10. Shell Programming and Scripting

How we can pass the argument when calling shell script from perl script

Can someone let me know how could I achieve this In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies
EvmEventFormat(3)					     Library Functions Manual						 EvmEventFormat(3)

NAME
EvmEventFormat(), EvmEventFormatFromTemplate(), EvmVarFormat() - format events for display SYNOPSIS
Library EVM Support Library Parameters buffer A pointer to a character string to receive the formatted event data. The stored string is null-terminated, even if trun- cated, unless the length operand is zero(0). length The maximum length (number of characters) of the output string. If the formatted event is longer than length, the output is truncated. event The event to be formatted. show_template The primary template for formatting the output. var_name The name of a variable data item of the event whose value is to be formatted. translate A Boolean value indicating whether I18N (internationalization) translation is to be attempted on the variable data item (var_name). If the translate operand is translation is attempted. In addition, the following conditions must be met: o The variable is of type string and includes an I18N (internationalization) message identifier o The event contains I18N (internationalization) catalog information. DESCRIPTION
Information contained in an event must be formatted into a readable format. The software which posts the event (event poster) supplies formatting information through the event's format data item. The routines described here explain the event formatting capabilities. The routine combines the supplied event's format data item with any data items or variables specified in the event's format item that are available in the event. returns a formatted version of the event in buffer. If the event contains I18N message catalog information, and the catalog is available in the user's locale, the format string is retrieved from the message catalog if possible. If no translation is possible, the format string from the event is used. If the event does not contain format information, produces a generic display of the event's name and any variables. The routine also formats the supplied event. uses the supplied show_template string as its primary formatting template. Literal charac- ters in show_template are transferred to the buffer unchanged. Any token of the form or is replaced by the value of the corresponding data item from the supplied event, if it is present. item_name is the name of the item stored in the event. If width is supplied, the value occupies a minimum of width character positions. width is an integer number specifying the size of the value stored in item_name. The item_name is the name of a standard event data item. The special string is replaced by the results of applying to the event. Refer to evmshow(1) and EvmEvent(5) for more information about formatting events for display. retrieves a variable called var_name from the supplied event, and returns a formatted version of its value in buffer. If translate is I18N translation is applied as appropriate. Notes Floating point values are formatted using the format specifier. RETURN VALUE
The operation completed without error. One of the arguments to the function is invalid. A value in a structure member is invalid. An operation failed because an attempt to acquire heap memory failed. ERRORS
The value of is not set. SEE ALSO
Commands evmshow(1), locale(1). Routines EvmEventDump(3), printf(3S), setlocale(3C). Event Management EVM(5). EVM Events EvmEvent(5). EvmEventFormat(3)
All times are GMT -4. The time now is 06:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy