Re: sh: 1: /media/mycomputer/Seagate: not found

new topic     » goto parent     » topic index » view thread      » older message » newer message
_tom said...

tom@tom-ideacentre-Y900-34ISZ:/media/fred/Seagate Backup Plus Drive/phix$ ./p64 -c hello 
sh: 1: /media/fred/Seagate: not found 

Ah, it is a "spaces in the path" problem, reproduced here by renaming my phix directory as "phix space":

pete@pete-VirtualBox:~/phix space$ ./p hello 
"hello" 
pete@pete-VirtualBox:~/phix space$ ./p -c hello 
sh: 1: /home/pete/phix: not found 
The fix is quite straightforward, in p.exw around line 2100:

        if bind then 
>           string paramstr = "" 
            for i=1 to length(params) do 
--if 0 then 
--              outfile &= ' '&params[i] 
--else 
                pi = params[i] 
                if find(' ',pi) then 
                    pi = '\"'&pi&'\"' 
                end if 
<--             outfile &= ' '&pi 
>               paramstr &= ' '&pi 
--end if 
            end for 
            if bind>1 then 
<--             printf(1,"==>system_wait(%s):\n",{mainpath&outfile}) 
>               printf(1,"==>system_wait(%s):\n",{"\""&mainpath&outfile&"\""&paramstr}) 
            end if 
<--         errorcode = system_wait(mainpath&outfile) 
>           errorcode = system_wait("\""&mainpath&outfile&"\""&paramstr) 
            if bind=2 then 
                if errorcode=0 then 
<--                 outfile = mainpath&pnew2()&" -pmkr3" 
>                   outfile = "\""&mainpath&pnew2()&"\" -pmkr3" 
                    printf(1,"==>system_wait(%s):\n",{outfile}) 
                    errorcode = system_wait(outfile) 
                    if errorcode = 0 then 
<--                     outfile = mainpath&pnew()&" -pmkr4" 
>                       outfile = "\""&mainpath&pnew()&"\" -pmkr4" 
                        printf(1,"==>system_wait(%s):\n",{outfile}) 
                        errorcode = system_wait(outfile) 
                        if errorcode = 0 then 
                            printf(1,"self-host rounds 1..4 successfully completed (%3.2fs)\n",time()-t0) 

The < and > in column 1 are from a compare of my (windows) master and the fix I did on linux, delete them.
Instead of the usual ./p -c p, I had to use ./p p -c p to get it to recompile, that is in a directory with spaces in it.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu