Re: [shell]
This WebDNA talk-list message is from 2002
It keeps the original formatting.
numero = 46388
interpreted = N
texte = ok..i'm not sure actually if i can do that. this is it:[shell]OLD=<\!--HAS_WEBDNA_TAGS-->NEW=<\!--HAS_WEBDNA_TAGS-->[include\/path\/to\/counters\/counter.inc]FILE=/path/to/my/file.htmlsed s/$OLD/$NEW/g $FILE > $FILE.new/bin/mv $FILE.new $FILE[/shell]didn't work.... the script actally is like this:#!/bin/shOLD=$1 # first parameter of the scriptNEW=$2 # second parametershift ; shift # discard the first 2 parameters: the next are the filefor file in $* # for all files given as parametersdo# replace every occurrence of OLD with NEW, save on a temporary file sed s/$OLD/$NEW/g ${file} > ${file}.new# rename the temporary file as the original file /bin/mv ${file}.new ${file}doneand this works on the command line without sudoing to anything...yOn Wed, 18 Dec 2002, Kalin Mintchev wrote:>> yea i did. that was my first test... i'll do it again - just a minute...>> On Wed, 18 Dec 2002, Alain Russell wrote:>> > Ah .. Linux, not OSX> > Have you tried running the script inside of [shell] as opposed to calling a> > script ..> >> > Take the contents of the script and try it within [shell][/shell]> >> > > On Wed, 18 Dec 2002, Alain Russell wrote:> > >> > >> If you run this from the command line .. NOT inside [shell] the system will> > >> execute the command as the user 'www' the same as webdna runs as - to see if> > >> it does what it is supposed to.> > >> > > that i know. my webdna runs under nobody.. that's the one i used and it didn't> > > work..> > >> > >>> > >>> Sudo -u www ./replc.sh <\!--HAS_WEBDNA_TAGS--> .. .etc didn't work....> > >>> > >>> > >> -------------------------------------------------------------> > >> 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/> > >>> > >> > >> > > -------------------------------------------------------------> > > 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/> >> >> > -------------------------------------------------------------> > 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/> >>>> -------------------------------------------------------------> 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/>-------------------------------------------------------------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:
ok..i'm not sure actually if i can do that. this is it:[shell]OLD=<\!--HAS_WEBDNA_TAGS-->NEW=<\!--HAS_WEBDNA_TAGS-->[include\/path\/to\/counters\/counter.inc]FILE=/path/to/my/file.htmlsed s/$OLD/$NEW/g $FILE > $FILE.new/bin/mv $FILE.new $FILE[/shell]didn't work.... the script actally is like this:#!/bin/shOLD=$1 # first parameter of the scriptNEW=$2 # second parametershift ; shift # discard the first 2 parameters: the next are the filefor file in $* # for all files given as parametersdo# replace every occurrence of OLD with NEW, save on a temporary file sed s/$OLD/$NEW/g ${file} > ${file}.new# rename the temporary file as the original file /bin/mv ${file}.new ${file}doneand this works on the command line without sudoing to anything...yOn Wed, 18 Dec 2002, Kalin Mintchev wrote:>> yea i did. that was my first test... i'll do it again - just a minute...>> On Wed, 18 Dec 2002, Alain Russell wrote:>> > Ah .. Linux, not OSX> > Have you tried running the script inside of [shell] as opposed to calling a> > script ..> >> > Take the contents of the script and try it within [shell][/shell]> >> > > On Wed, 18 Dec 2002, Alain Russell wrote:> > >> > >> If you run this from the command line .. NOT inside [shell] the system will> > >> execute the command as the user 'www' the same as webdna runs as - to see if> > >> it does what it is supposed to.> > >> > > that i know. my webdna runs under nobody.. that's the one i used and it didn't> > > work..> > >> > >>> > >>> Sudo -u www ./replc.sh <\!--HAS_WEBDNA_TAGS--> .. .etc didn't work....> > >>> > >>> > >> -------------------------------------------------------------> > >> 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/> > >>> > >> > >> > > -------------------------------------------------------------> > > 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/> >> >> > -------------------------------------------------------------> > 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/> >>>> -------------------------------------------------------------> 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/>-------------------------------------------------------------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:
my price won't move (1997)
Stats (2004)
Need help!! on searching in two databases. (1998)
headers (2000)
ooops...WebCatalog [FoundItems] Problem - LONG - (1997)
timing out? (1997)
Affiliate Marketing Question #2 (1998)
Using Cookie for client specific info? (1997)
4.0 upgrade pricing (2000)
and vs or vs not (1998)
Server IP Address (2003)
pc (1997)
Need relative path explanation (1997)
PSC recommends what date format yr 2000??? (1997)
Fax Broadcast (1998)
PSC recommends what date format yr 2000??? (1997)
shipcost and Formulas.db (2000)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Country & Ship-to address & other fields ? (1997)
Searching multiple fields from one form field (1997)