multiple commands

Hi,

I have multiple commands that i need to run daily on my Solaris servers and watch the output, and actually i do it as multi-tasking. I do not want to put all of them in the file, and run it, and get the entire output at one time.

What i want is that it should ask for before it runs next command.

What is the best way to accomplish it. Could some help me on this?

Thanks, John,

See this example on prompting for input

Thanks for prompt response. I know how to read an input, my question is how to prompt next command to run.

You mean like the pause command in windows batch files?

Check Howto add pause prompt in a shell script ( bash pause command )

Feel free to replace the echo $LINENO by your task1 task2 task3 ...

 # cat -n mtst
     1  ask(){
     2       echo "Do you want to continue y/[n]?"
     3       read a
     4       case $a in
     5            Y|y|yes|YES) RC=0 ;;
     6            *) RC=1 ;;
     7       esac
     8       return ${RC}
     9  }
    10
    11  echo $LINENO
    12  ask || exit $?
    13  echo $LINENO
    14  ask || exit $?
    15  echo $LINENO
    16  ask || exit $?
    17  echo $LINENO
    18  ask || exit $?
    19  echo $LINENO
    20  exit $?
# ksh mtst
11
Do you want to continue y/[n]?
y
13
Do you want to continue y/[n]?
y
15
Do you want to continue y/[n]?
n
#

Yes, this is what i wanted.