Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

amokwao

Re: multiple -cmds for external application

Got it working by adding \n between the commands. Thank you.
martin

Re: multiple -cmds for external application

Then probably the only way it to really automate multiple "lines" (with "Enter" in between). But I'm not sure if that's possible with KiTTY -cmd switch. No longer WinSCP question, sorry.
amokwao

Re: multiple -cmds for external application

martin wrote:

amokwao wrote:

Yes it does. That's why I need to cd back into the current directory. Is there a way to stop that?

That's not a question for WinSCP. Is do not know qsub. What is it?


qsub is used to submit batch jobs to our uni's supercomputers. with qsub -I, I ask it to get me a node so I can work on it interactively. That's the only way they allow us to use cpu intensive programs like matlab. When I use winSCP to launch kitty i have to do it every time I lose connection or something. I'm lazy :mrgreen: and don'w want to qsub bla bla bla 20 times a day.

Thanks
martin

Re: multiple -cmds for external application

amokwao wrote:

Yes it does. That's why I need to cd back into the current directory. Is there a way to stop that?

That's not a question for WinSCP. Is do not know qsub. What is it?
amokwao

Re: multiple -cmds for external application

martin wrote:

Doesn't the qsub start a new sub-shell?


Yes it does. That's why I need to cd back into the current directory. Is there a way to stop that?
martin

Re: multiple -cmds for external application

Doesn't the qsub start a new sub-shell?
amokwao

Re: multiple -cmds for external application

Got the same results. Grabs the nodes and returns to the home directory and does not execute the next cd or the module load.
Thanks.


martin wrote:

What happens if you execute the command in SSH terminal? The exactly same command, just with the !/ replaced with real paths.
martin

Re: multiple -cmds for external application

What happens if you execute the command in SSH terminal? The exactly same command, just with the !/ replaced with real paths.
amokwao

Re: multiple -cmds for external application

Thank you, The last cd '!/' does not seem to work after the qsub. Also the module load. Could it be something at the machine level?
Thanks


martin wrote:

This should work:

D:\Dropbox\pAPPS\ssh\kitty.exe -load winSCp !U@!@  -cmd "cd '!/' ; qsub -I -X -l nodes=2:ppn=4,walltime=2:00:00 ; cd '!/' ; module load matlab"


Though combining the -load and !U@!@ does not look correct either.
martin

Re: multiple -cmds for external application

This should work:

D:\Dropbox\pAPPS\ssh\kitty.exe -load winSCp !U@!@  -cmd "cd '!/' ; qsub -I -X -l nodes=2:ppn=4,walltime=2:00:00 ; cd '!/' ; module load matlab"


Though combining the -load and !U@!@ does not look correct either.
amokwao

multiple -cmds for external application

Hi
I would like to send multiple cmds when I lunch kitty using the "Open session in Putty". This is what I have:

D:\Dropbox\pAPPS\ssh\kitty.exe -load winSCp -cmd "cd '!/'" !U@!@ -cmd  "qsub -I -X -l nodes=2:ppn=4,walltime=2:00:00"


This works fine but after grabbing a queue I would like it to return to the current directory and load some modules like so:

D:\Dropbox\pAPPS\ssh\kitty.exe -load winSCp -cmd "cd '!/'" !U@!@ ; "qsub -I -X -l nodes=2:ppn=4,walltime=2:00:00" ; cd "cd '!/'" ; "module load matlab"


I have tried adding semicolons (like above) and -cmd to the different commands but none seem to work.
Thank you.