I noticed some strange looking parameters on some processes on one of our servers, and after a little playing around we deduced that ksh seemed to be adding a (somewhat random) extra parameter when calling a script without a hashbang in it.
It looks like it's the partial name of the parent script (and not always the same number of characters). I'm thinking it's not just a display artifact as it's in /proc/xxx/cmdline as well. However, the script arguments don't see it.
It doesn't happen if the child script has a hashbang or is called explicitly with ksh, or if the parent script is run with bash.
It doesn't appear to be causing any actual problem for the real script, but it seems a tad odd.
In a ksh script on an AIX box running a jillion oracle database processes, I'm setting a variable to one of two possible arguments, depending on cmd line arguments.
FINDIT="ps -ef | grep oracle | grep DBexport | grep rshrc"
-or-
FINDIT="ps -ef | grep oracle | grep prod | grep runback"
I... (3 Replies)
Hello All,
I have a whole bunch of shell scripts written in a ksh environment and which successfully execute there. However, I found out that they eventually need to be used in a sh environment. So some commands like some_variable=$(some_command) fail because sh doesn't understand $(.....). I... (11 Replies)
Hi All,
Am using the below command to start my application using the root user
su - bin -c "/home/bin/test/start.sh"
but am getting the error becaue i have set some environment varibales in bin .profile
when i execute the command start.sh by logging directly into bin account it's... (8 Replies)
Hi all,
I have set up a cron job which calls another shell script shell script which in turn calls a Java process. The cron tab looks so.
0,30 7-18 * * 1-5 /u01/home/weblogic/brp/bin/checkstatus.sh >> /u01/home/weblogic/logs/checkstatus.log
The checkstatus.sh scripts looks like this.
... (4 Replies)
Im writing a script in the Ksh, as the title suggests.
OK so im sincerely tring to be lazy. Im trying to make a script that will use another file as a sort of variable library
So basically i dont need to include the variables themselves, just want to make a reference to the file, so the... (2 Replies)
Hi
I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email.
For example
-------
Script ABC
-------
a.ksh
b.ksh
c.ksh
I need to call all three scripts execute them and... (2 Replies)
Hi All,
I am new to this forum. I would really appreciate if some one from you expert team could answer my qns:
1) whats the difference between the below commands. what events occur in the background when I fire each of the three commands.
>./script.ksh
>sh script.ksh
>script.ksh
... (11 Replies)
Dear Members,
I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc.
I would like to create a script which will will call other scripts based on the request action.
Can we directly read from the REQUEST_ACTION... (2 Replies)
Hi,
How to restrict access to a .ksh script in such the way that the users can only execute the script, neither read nor write.
I tried the below code so that my user alone has the rwx and other users can only execute.
chmod 711 sample.ksh
But when I logged in as a different user... (26 Replies)
Discussion started by: machomaddy
26 Replies
LEARN ABOUT PHP
let
let(1) User Commands let(1)NAME
let - shell built-in function to evaluate one or more arithmetic expressions
SYNOPSIS
ksh
let arg...
DESCRIPTION
ksh
Each arg is a separate "arithmetic expression" to be evaluated.
EXIT STATUS
The following exit values are returned:
0 The value of the last expression is non-zero.
1 The value of the last expression is zero.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO ksh(1), set(1), typeset(1), attributes(5)SunOS 5.10 15 Apr 1994 let(1)