UNIX machine and special character &

Advertisement

solyman
Joined:
Posts:
3
Location:
alexandria

UNIX machine and special character &

Dear Winscp support

I am using WinSCP.com file to got the command line and open ftp session for my UNIX server

when I try to use the order "call" to send and Executes arbitrary remote command I face a certain problem which is

when I type the command
------------------------------------
winscp > call /usr/Systems/script/mmlmacro -f /home/alarm/alarm.mjs

-------------------------------------
the script run and every thing is ok


but when I type the command

------------------------------
winscp > call /usr/Systems/script/mmlmacro -f /home/alarm/alarm.mjs |&
---------------------------------

to execute the command in the background I got the following error message

ksh[5]: syntax error at line 7 : `newline or ;' unexpected

I think the error is duoto the spesial character & since the command

------------------------------------
winscp > call /usr/Systems/script/mmlmacro -f /home/alarm/alarm.mjs |at now
--------------------------------


the command works well

plz help me to solve my problem , I think the error in the way i enter the &(and symbole)

thank you in advance

Reply with quote

Advertisement

Guest

Re: UNIX machine and special character &

When you are trying to "background a process", I believe you are supposed to just use "&", but you are using "|&". I've never seen "piped to and" before. You normally use pipe when there is another command after the pipe, but just use "&" when you want to "background the process".

As prikryl said this may still not work in non-interactive shells, but I just thought I'd mention that the "|&" looks odd to me, so try it without the "|", just to make sure that don't work either.

You could also try to make mmlmacro background itself...or make a version that will background itself mmlmacro-bg.

Reply with quote

solyman
Joined:
Posts:
3
Location:
alexandria

Re: UNIX machine and special character &

Dear

the problem in the "&" character not in the "|" character

first i tried the "&" and it did not work and i got an error message

so I tried different solution which is using the "|&" and it works in the shell directly but did not work using the call command of the winscp



Anonymous wrote:

When you are trying to "background a process", I believe you are supposed to just use "&", but you are using "|&". I've never seen "piped to and" before. You normally use pipe when there is another command after the pipe, but just use "&" when you want to "background the process".

As prikryl said this may still not work in non-interactive shells, but I just thought I'd mention that the "|&" looks odd to me, so try it without the "|", just to make sure that don't work either.

You could also try to make mmlmacro background itself...or make a version that will background itself mmlmacro-bg.
:D :D :D

Reply with quote

Advertisement

You can post new topics in this forum