revCopyFile problems on Mac OS X.6.4

biodan biodan at biodan.org
Mon Sep 6 16:27:28 EDT 2010


After i posted, i caught the quote var issue, but bear in mind, i'm talking
about command-line from a Terminal shell, NOT the using the Rev IDE GUI. I
use rev a lot for utility scripts to hash data - no need for a GUI in these
instances.

Thierry wrote:
> put tCmd
> should have given you enough explanation...

After changing my code, I get the following from calling 'put tCmd' :

>   cp /Users/adan/Desktop/t.txt /Users/adan/Desktop/test/

> Personally,  I never use this error prone syntax of putting vars inside
> quoted strings...
 
agreed, i slipped in this example, but have used the shell 'cp' command
successfully in Linux with rev3.5 and earlier- all from a pure command-line
usage

> ##### One way to do it :

> put "cp" && q( tInfile) && q( tOutDir) into tCmd
> put shell( tCmd )
> end mouseUp

You are using the IDE ('mouseup')  ! i am using a command-line script
starting with

#!/Users/adan/bin/rev40  -- copied the Standalone to my ~/bin
on startup
  .... code here....
end startup

Your examples below do not work for me from a command-line with rev3.5 or
rev4 engines in OSX from a command-line. 

In Ubuntu, the rev4 engine fails too - i have never had much luck with the
rev4 engine in Linux -  but rev3.5 works pretty well.  

After reading the release notes for 4.5beta, it appears the standalone from
4.0 onwards no longer works in pure command-line (e.g. cgi) form. Too
bad....

As it is, i can't download the 4.5beta, getting a 404 from both Mac OSX and
Linux (i have Enterprise).

>function q t
 >  return quote & t & quote
> end q

>##### Another way which I prefer :

>get format( "cp   ' %s '   ' %s ' ", tInfile, tOutDir )
>put shell( it )

> ##### A variation of it, which is how I code :

> on mouseUp   
>   get shell( format( "cp   '%s' '%s'",      \
>          $HOME & "/Desktop/test.txt" , \
>         $HOME & "/Desktop/outDir"     ) )
>end mouseUp 
-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/revCopyFile-problems-on-Mac-OS-X-6-4-tp2402998p2528852.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list