Korn Shell Wrapper script

Hi Guys, I am trying write a wrapper script but I don't have any idea. I have 4 different korn shell scripts and all of them needs some parameters from command line (positional parameter). My script cant be interactive because its supposed to be automated. I am confused how can I write a wrapper script and pass parameters to all of them because all of them needs different parameters. My script is like this

script1 server_name dest_dir soruce_dir dest_server
script 2 user_id list1 list2 logfile
script 3 param1 param2 param3
script param1 param2

So in this condition how can i write a wrapper script and script should run sequentially one after another not parallelly/

Thanks in advance.
Any help will be appreciated

1) Count how many different parameters you have. It's not clear from your post.
2) Pass them as $1 $2 $3 $4 ... from the wrapper script.

e.g. Call 
wrapper_script server_name dest_dir source_dir dest_server user_id list1 ....

e.g. Part of wrapper_script

#!/bin/ksh
server_name="$1"
dest_dir="$2"
source_dir="$3"
dest_server="$4"
user_id="$5"
list1="$6"


script1 "${server_name}" "${dest_dir}" "${source_dir}" "${dest_server}"

Try using getopts to deal with parameters and positioning.

Here is an example from one of my scripts:

while getopts ":npsuc:" opt
do
        case $opt in
        c) cOmmand="$OPTARG" ;;
        n) HOSTS=$AIXNP ;;
        p) HOSTS="$AIXPROD $HOSTS" ;;
        s) HOSTS="$SUNPROD $HOSTS" ;;
        u) HOSTS="$HOSTS $SUNNP" ;;
        ?) printusage
                exit 1;;
        esac
done
if [[ -z $cOmmand || -z $HOSTS ]]; then
  printusage
  exit 2
fi

if ! echo $cOmmand | grep [a-zA-Z]; then
  echo "invalid command: $cOmmand"
  printusage
  exit 2
fi

I cannot give parameter as $1 $2 $3 $4 on the wrapper script because it may vary. wrapper script is a individual script can be run from anywhere if copied along with 4 other scripts. So user can give different arguments to it depending on the requirement for example.
one user may give dest_dir, source_dir and user_id different than other user and thts the case most of the time.

It cannot be interactive also so we cannot prompt its supposed to be automated. I believe there is some way to do that by wrapper script

About that get opt example I dint get much of it. Would you mind telling me how it works.

thanks alot

getopts is a ksh function that will assist in parsing command line arguments. You can specify flags with or without options.

Example:

-a
-b <argument>

If you want this script to process different files in different ways with different options, this function will assist. For example, option a could be file type a, option b could mean that it is a file type of b. option x could accept a parameter that is a variable used (perhaps the file name). Use the : after the option on the getopts line to denote a parameter goes with the option.

this link may describe it better:
getopts(1)

The guys on the HP ITRC board seem to be finding this one just as frustrating.

HP ITRC

seems like you've been given very similar answers, but: