mml scripts

i am writing an mml script below

#!/bin/sh

start.sh mml

login abcd piss internal

set serv=abc

set term=internal

After the start.sh mml runs i get the prompt

% start.sh mml
MML>>>

at this prompt i need to put in

"login abcd piss internal"

but i dont know how to make this work in the script above

Please use code tags for formatting. You might try something like the following:

#!/bin/sh

start.sh mml <<-EOF
  login abcd piss internal
  set serv=abc
  set term=internal
EOF

i get the response

EOF: << terminator not found.
am using #!/usr/bin/csh

So the "set serv=abc" isn't part of the mml login, it's part of the script? Your original code was #!/bin/sh and not #!/usr/bin/sh.

I don't know anything about mml, is the login the only line that is what goes into mml? I'm assuming that the set serv and set term lines are part of the csh script and not mml, yes?

it is only the start.sh mml that is csh scripts.

The rest are part of the mml login.

Is the final "EOF" the only thing on its own line without any white space around it?

yes please

The only way I can test this and come up with the results you're seeing "terminator not found" is by using csh which is different than the code you've given. Please post the exact code you're using. You might try removing the hyphen from the beginning of the here document since it doesn't appear to be supported with csh.

Why not scripting your interactive login with expect?


i am writing an mml script below

#!/bin/sh

start.sh mml

login abcd piss internal

set serv=abc

set term=internal

After the start.sh mml runs i get the prompt

% start.sh mml
MML>>>

at this prompt i need to put in

"login abcd piss internal"
"set serv=abc"

"set term=internal"

but i dont know how to make this work in the script above

Were you intending on re-posting your original question? I was expecting to see the code that had the here document that was generating the "terminator not found" message. Also, using expect might also be a good solution if there is any logic you need to apply during the interactive portion of the script.

#!/usr/bin/csh

start.sh mml << EOF
login abcd piss internal
set serv=PPS
set term=internal

EOF

with the code above it works only to the start.sh mml.
the input to the mml which is

login abcd piss internal
set serv=PPS
set term=internal

doesnt work

Assuming you're using this code:

#!/usr/bin/csh

start.sh mml  << EOF
login abcd piss internal
set serv=PPS
set term=internal

EOF

means "terminator not found"? Can you switch to bash instead of csh for this segment of code? If you're getting some other problem, can you give more details than "doesn't work"?

it works only in CSH

other give the response

ksh: start.sh: not found

Sounds like ksh doesn't have a path set to find start.sh. What happens if you change to ksh or bash and give the full path to start.sh?