Both do the same job. then why use this ". ${0%${0##*/}}Script2" instead of simply using ". ./Script2"?
In this case they expand to the same value, but that has not always to be the case. Suppose the following: you call your script not from the directory where it is stored but from somewhere else:
inside your script the "./" will expand to the PWD, which is not where the script is stored but where you have been when starting the script - "/some/dir" in the example, not "/some/other/dir". If you now execute
you will execute "/some/dir/script2" instead of "/some/other/dir/script2". Still $0 will contain "/some/other/dir/script" and subsequently the expansion will find script2 on its correct place.
As a rule of thumb: avoid relative paths like the plague in scripts. Always use absolute paths to make sure you end up where you suppose to end up.
#!/bin/sh
$ORACLE_HOME/bin/sqlplus -S $orauserid/$orapasswd@$oradb << _TMP
alter session set nls_date_format = 'YYYYMMDD HH24:MI';
set linesize 100
set pagesize 400
ok the above is part of a script..i just wanna know what does sqlplus -S means?? as in why we need to insert the -S behind? (2 Replies)
Masters,
I am trying to learn the serial mouse driver for linux kernel. On the kernel source tree I find out these macros and I am unable to find out the meaning of these macros. Please anyone help me to understand these.
These macros are defined in linux/serio.h... (2 Replies)
can some one please tell the meaning of the second statement i.e
n=${m#*=}
i couldnt get the meaning of the #*=
1.) m="mohit=/c/main/issue"
echo $m
result
-----------
mohit=/c/main/issue
2.) n=${m#*=}
echo $n
RESULT
-------
/c/main/issue (1 Reply)
Hi ,
Can anyone please let me know whta the follwoing piece of code for
ScriptName=${0##*/}
if pgrep -f "$ScriptName" | grep -v "^$$\$" ; then
echo `date`": Sctipt $ScritName is already runnig"
exit
fi
Thnx a lot in advance
Please use code tags when posting data and code... (8 Replies)
Please let me know the meaning for the below statements in shell scripting.
1) exit -99
--------------------------------
2) set prgdir = `pwd`
set runFlag = runFlag:FALSE
-------------------------------------
3) if (-f $prgdir/maillst.eml) then
set distEmail = `cat $prgdir/maillst.eml`... (1 Reply)
Hello everyone,
I'm looking for the meaning of this expression, as I don't understand it quite clearly : $1^
What do you think it could be?
I thought either:
- match lines starting with argument 1 but it should be ^$1
- turn line around : word becomes drow
Thanks in advance for your... (4 Replies)
Discussion started by: bibelo
4 Replies
LEARN ABOUT DEBIAN
exrpptm
exrpptm(1) General Commands Manual exrpptm(1)NAME
exrpptm - performs tone mapping on an OpenEXR image (photoreceptor)
SYNOPSIS
exrpptm [options] input.exr output.exr
DESCRIPTION
Performs the tone mapping function described in this paper:
Erik Reinhard and Kate Devlin. Dynamic Range Reduction Inspired by Photoreceptor Physiology. IEEE Transactions on Visualization and Com-
puter Graphics (2004).
The input image should be normalized, and the output file returned by this function should also be normalized before viewing.
OPTIONS -f Controls the intensity of the resulting image. Valid range is from -8 to 8, defaulting to 0.
-m Controls the contrast of the resulting image. Valid range is from 0.3 to 1.0. The default value of 0 uses an algorithm to calcu-
late an appropriate m factor for the image based on its luminance.
-c Amount of chromatic adaptation to apply to the image. Valid range is from 0 meaning no chromatic adaptation to 1 meaning fully
adapted. Defaults to 0.
-a Controls the light adaptation. Valid range is from 0 meaning that the adaptation is global to 1 meaning that the adaptation is
based on pixel intensity. Defaults to 1, to trade detail visibility for contrast.
AUTHORS
Billy Biggs <vektor@dumbterm.net>.
SEE ALSO exrtools(1).
exrtools 0.4 December 2003 exrpptm(1)