Here's a shell command that runs nicely in RunRev and LiveCode:
get shell ("zip -q0X BodySnatchers.epub mimetype")
But I want to use it with a variable filename: BodySnatchers.epub might be ShrinkingMan.epub one day, or RootsOfElvis.epub on a different occasion, or any other name, depending on the text I am "epubbing".
Is it possible to somehow execute the shell command with a variable that contains the name of the file?
Using parameters with Shell
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Using parameters with Shell
Code: Select all
put "BodySnatchers.epub" in theEpub
get shell ("zip -q0X " & theEpub & " mimetype")

P.D.: Guardamanr del Segura? eres español?
Re: Using parameters with Shell
Hola Giuseppe,
Thanks for the pointer in the right direction. I have used something similar and this works:
put eBookepubFileName & ".epub" into epubFileName
put "zip -q0X" && epubFileName && "mimetype" into shellCode
get shell (shellCode)
Edit: CORRECTION! This doesn't work!!! I assumed it did, as no error was returned, but I have now discovered that it fails quietly.
(No soy español, pero tengo residencia aquí en España. Soy oriundo de Gales, pero he vivido más en otros paises, como Inglaterra y Belgica.)
Thanks for the pointer in the right direction. I have used something similar and this works:
put eBookepubFileName & ".epub" into epubFileName
put "zip -q0X" && epubFileName && "mimetype" into shellCode
get shell (shellCode)
Edit: CORRECTION! This doesn't work!!! I assumed it did, as no error was returned, but I have now discovered that it fails quietly.
(No soy español, pero tengo residencia aquí en España. Soy oriundo de Gales, pero he vivido más en otros paises, como Inglaterra y Belgica.)