Re: [shell]
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 46450
interpreted = N
texte = On Thu, 19 Dec 2002, John Peacock wrote:> Kalin Mintchev wrote:> > command line:> > ./replc.sh <\!--HAS_WEBDNA_TAGS--> <\!--HAS_WEBDNA_TAGS-->[include> > \/includes\/counters\/booooo_counter.inc]> > /path/to/file/moo.html> >>> Two things you can do is write a simple shell script which merely echos out its> commandline parameters, to see whether the shell escapes are processed or not.> Or else, you could just take my guess as correct and do this instead:>> [shell]> ./replc.sh [include> /includes/counters/booooo_counter.inc]> /path/to/file/moo.html> [/shell]i can not do that - the tags get interpreted by wc before the thing ispassed to the shell so there is no variables anymore and i get the errorthat the include file is not found....so i changed the variables - instead of ihave now only TAGS--> and [raw]ed the [include] tag...i added echos to show the variables the script works with...1. in the command line the echoed variables are:TAGS-->TAGS-->[include \/includes\/counters\/boo_counter.inc]/path/to/me/file.htmlthis works fine.....i can't do it without escaping the slashes here2. in the [shell]:TAGS--> TAGS-->[include \/includes\/counters\/boo_counter.inc]/path/to/me/file.htmlwhich is the same.....so the script gets executed but it doesn't do the sed... i guess...i added sudo before the sed command in the script and again it works fromthe command line but not from the template...not escaping the slashes here doesn't help either - and it shouldn'tbecause the variables should be passed to the sed in the script so they'llhave to be escaped anyway... even if the [shell] is supposed to prechewthe command....the script is 775ed so everybody can execute it. users don't matter...doesn't do it....>> NOTE: it is not clear to me what directory is current when the [shell] script it> run: is it the current template directory? or the WebCatalogEngine directory? or> where?the script is in the same directory where the template is. that's why is./rplec.sh and that's how it executes from the command lineother suggestions i tried were:/bin/sh ./replc.sh ....and/absolute/path/replc.sh......>> NOTE 2: if this is a one-time change, it is much more appropriate to ssh to the> server and use find to walk the tree and update all of the files...i wouldn't go through all this trouble if it was only one time change...as i mentioned earlier it's for a custom admin pages for a client thatwants to put randomly counter scripts in some of it's site pages...whenever/wherever s/he wants....what next?!....thanks.....>> HTH>> John>>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
On Thu, 19 Dec 2002, John Peacock wrote:> Kalin Mintchev wrote:> > command line:> > ./replc.sh <\!--HAS_WEBDNA_TAGS--> <\!--HAS_WEBDNA_TAGS-->[include> > \/includes\/counters\/booooo_counter.inc]> > /path/to/file/moo.html> >>> Two things you can do is write a simple shell script which merely echos out its> commandline parameters, to see whether the shell escapes are processed or not.> Or else, you could just take my guess as correct and do this instead:>> [shell]> ./replc.sh [include> /includes/counters/booooo_counter.inc]> /path/to/file/moo.html> [/shell]i can not do that - the tags get interpreted by wc before the thing ispassed to the shell so there is no variables anymore and i get the errorthat the include file is not found....so i changed the variables - instead of ihave now only TAGS--> and [raw]ed the [include] tag...i added echos to show the variables the script works with...1. in the command line the echoed variables are:TAGS-->TAGS-->[include \/includes\/counters\/boo_counter.inc]/path/to/me/file.htmlthis works fine.....i can't do it without escaping the slashes here2. in the [shell]:TAGS--> TAGS-->[include \/includes\/counters\/boo_counter.inc]/path/to/me/file.htmlwhich is the same.....so the script gets executed but it doesn't do the sed... i guess...i added sudo before the sed command in the script and again it works fromthe command line but not from the template...not escaping the slashes here doesn't help either - and it shouldn'tbecause the variables should be passed to the sed in the script so they'llhave to be escaped anyway... even if the [shell] is supposed to prechewthe command....the script is 775ed so everybody can execute it. users don't matter...doesn't do it....>> NOTE: it is not clear to me what directory is current when the [shell] script it> run: is it the current template directory? or the WebCatalogEngine directory? or> where?the script is in the same directory where the template is. that's why is./rplec.sh and that's how it executes from the command lineother suggestions i tried were:/bin/sh ./replc.sh ....and/absolute/path/replc.sh......>> NOTE 2: if this is a one-time change, it is much more appropriate to ssh to the> server and use find to walk the tree and update all of the files...i wouldn't go through all this trouble if it was only one time change...as i mentioned earlier it's for a custom admin pages for a client thatwants to put randomly counter scripts in some of it's site pages...whenever/wherever s/he wants....what next?!....thanks.....>> HTH>> John>>-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Kalin Mintchev
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
quotation marks (2004)
unable to launch acgi in WebCat (1997)
upgrading (1997)
unsubscribe (1997)
authorizenet/webmerchant (2000)
[TaxableTotal] - not working with AOL and IE (1997)
[WebDNA] [test] last one, sorry...:p (2009)
won't serve .tpl (2000)
Transferring textareas (1997)
Header info in content (1998)
Links to show shopping cart. (1998)
[WebDNA] How to get a screen size (2009)
Clear command and ShoppingCart.tmpl (1997)
(2003)
Only charge card when product shipped ? (1997)
WebCatalog 2.0 & WebDNA docs in HTML ... (1997)
Protect (1997)
Help needed! (1998)
Re:quit command on NT (1997)
TCP Connect for a newbie (2002)