Script1 is invoked by process. It is not manual. When this process makes Script1 run I want it to pass a parameter to Script2. There is more code in Script1 than what I am showing. I want Script2 to contain code outside of Script1 because there are 13 other scripts that use the code in Script2. I do not want to have to maintain the code in 13 scripts.
The code inside Script1 is:
Then the code I have inside Script2 is: added code tags for readability --oombera
Hello all
i need to pass to my shell script parameter that looks like "2 3 3"
inside the script i need to use this string that looks like this "2 3 3"
but when i try to print the script im getting syntax error , this is my script :
set s = $1
echo $s (1 Reply)
I would like to write a scirpt a.sh that it first checks the first parameter of the input. If it fulfill some condition ,then run an executable program b by using all the parameter.
ie.
> ./a.sh 10 20 30 40 50
Then a.sh first checks the first parameter, 10, if it mathes the requirement, then... (2 Replies)
Hi,
I am writing a wrapper script(wrap_script.sh) to one of the main scripts (main_script.sh)
The main script is executed as following:
./main_script.sh <LIST> <STARTDATE> <ENDDATE>
looks for a parameter which is a LIST(consists of different list names that need to be processed), START/END... (0 Replies)
Hi friends.
i am newbie to shell scripting. I need to create a script where i will be passing 2 parameters to the script and based on that it should work.
For ex: start_proc a 2 or start_proc b 2
start_proc a 2 --- this should bring up 2 processes as i define inside the script.
start_proc... (2 Replies)
Hi,
I am unable to use parameter in sql script passed from unix script.
my sql script CREATE_SBI_LIST_GROUP.sql is like this -
-------------------------------
SELECT
SDS.ID "SO_ID",
SDS.SO a1,
sgp.sga__code SGA_CODE,
FROM
sga sga,sales_genl_provision sgp , comm_product_condn cpc... (2 Replies)
I need to parse log files using nawk, but I'm not able to pass script input argument (date) to nawk, for example:
------------
#!/bin/ksh
read date
nawk -F, '{if($1==date) print $4" "$5}'
-------------
Is there a way to pass an argument to nawk from shell script.
Many thanks... (8 Replies)
Discussion started by: samer.odeh
8 Replies
8. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
I have written a script which will take input parameter as another script.
However, if the script passed as input parameter has parameters then this script doesn't work.
I have a script b.ksh which has 1 and 2 as parameters
I have a script c.ksh which has 3,4 and 5 as parameters
vi a.ksh... (1 Reply)
OS version: RHEL 6.7
myTextFile.txt file is referred within Script1.sh script,
I only execute Script1.sh and I want the input variable to be passed inside myTextFile.txt . Any idea how I can do this ?
$ cat script1.sh
cat myTextFile.txt
$ cat myTextFile.txt
$1
Requirement1.... (4 Replies)
Discussion started by: kraljic
4 Replies
LEARN ABOUT MOJAVE
tcl_dowhenidle
Tcl_DoWhenIdle(3) Tcl Library Procedures Tcl_DoWhenIdle(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_DoWhenIdle, Tcl_CancelIdleCall - invoke a procedure when there are no pending events
SYNOPSIS
#include <tcl.h>
Tcl_DoWhenIdle(proc, clientData)
Tcl_CancelIdleCall(proc, clientData)
ARGUMENTS
Tcl_IdleProc *proc (in) Procedure to invoke.
ClientData clientData (in) Arbitrary one-word value to pass to proc.
_________________________________________________________________DESCRIPTION
Tcl_DoWhenIdle arranges for proc to be invoked when the application becomes idle. The application is considered to be idle when
Tcl_DoOneEvent has been called, could not find any events to handle, and is about to go to sleep waiting for an event to occur. At this
point all pending Tcl_DoWhenIdle handlers are invoked. For each call to Tcl_DoWhenIdle there will be a single call to proc; after proc is
invoked the handler is automatically removed. Tcl_DoWhenIdle is only usable in programs that use Tcl_DoOneEvent to dispatch events.
Proc should have arguments and result that match the type Tcl_IdleProc:
typedef void Tcl_IdleProc(ClientData clientData);
The clientData parameter to proc is a copy of the clientData argument given to Tcl_DoWhenIdle. Typically, clientData points to a data
structure containing application-specific information about what proc should do.
Tcl_CancelIdleCall may be used to cancel one or more previous calls to Tcl_DoWhenIdle: if there is a Tcl_DoWhenIdle handler registered for
proc and clientData, then it is removed without invoking it. If there is more than one handler on the idle list that refers to proc and
clientData, all of the handlers are removed. If no existing handlers match proc and clientData then nothing happens.
Tcl_DoWhenIdle is most useful in situations where (a) a piece of work will have to be done but (b) it is possible that something will hap-
pen in the near future that will change what has to be done or require something different to be done. Tcl_DoWhenIdle allows the actual
work to be deferred until all pending events have been processed. At this point the exact work to be done will presumably be known and it
can be done exactly once.
For example, Tcl_DoWhenIdle might be used by an editor to defer display updates until all pending commands have been processed. Without
this feature, redundant redisplays might occur in some situations, such as the processing of a command file.
BUGS
At present it is not safe for an idle callback to reschedule itself continuously. This will interact badly with certain features of Tk
that attempt to wait for all idle callbacks to complete. If you would like for an idle callback to reschedule itself continuously, it is
better to use a timer handler with a zero timeout period.
KEYWORDS
callback, defer, idle callback
Tcl 7.5 Tcl_DoWhenIdle(3)