Re: [OT] Shell script
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 60244
interpreted = N
texte = Hi thereThis has gotten me on the right track but still I am stuck. I nee=d to but the "final" name without the .txt extension in a variabl=e. So far I have tried everything but can't get any further. Any=20=clue?thistest=3D`ls *.text | awk '{print("mv "$1" "$1)}' | sed 's/.txt=//2'`echo $thistestThank you.Nitai--Redakto - Content Management that simply worksContent Management & eBusiness Systems ComputerOil=C2=AE AGDammstrasse 75400 Baden / SwitzerlandTelefon +41 (0)844 44 55 66 info@computeroil.comhttp://computeroil.com > -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On B=ehalf Of> Erol Guneri> Sent: Dienstag, 30. November 2004 13:48> To: WebDNA Talk> Subject: Re: [OT] Shell script> > Hi Nitai,> > Try this:> > ls *.txt | awk '{print("mv "$1" "$1)}' | sed 's/.txt//2'> > This will output a list of move commands onto the screen (to ch=eck it> first). If it looks fine, just add | /bin/sh to the end to mak=e it> execute.> > Erol> > > > ----- Original Message -----> From: "Nitai @ ComputerOil"
> To: "WebDNA Talk" > Sent: Tuesday, November 30, 2004 12:30 PM> Subject: [OT] Shell script> > > > Hi all> >> > I know off topic, but maybe someone knows an answer:> >> > I need to substract some text from a variable within a shell=20=script and> cant get it to work. Some code here:> >> > $file =3D myfile.txt> >> > And I need:> >> > $file =3D myfile> >> > Since $file can hold variable filenames I need to get somethi=ng that> just> substract the .txt on each file, so that I just remove the .txt=..> >> > I have tried to get something like this going:> >> > $file =3D substr($file,.txt)> > Or> > $file =3D sub(?,?,?)> >> > Maybe someone can shed some light? TIA.> >> > Nitai> >> > --> > Redakto - Content Management that simply works> > Content Management & eBusiness Systems> >> > ComputerOil=C2=AE AG> > Dammstrasse 7> > 5400 Baden / Switzerland> > Telefon +41 (0)844 44 55 66> >> > info@computeroil.com> > http://computeroil.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 digest@talk.smithmicro.com>> 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:
Hi thereThis has gotten me on the right track but still I am stuck. I nee=d to but the "final" name without the .txt extension in a variabl=e. So far I have tried everything but can't get any further. Any=20=clue?thistest=3D`ls *.text | awk '{print("mv "$1" "$1)}' | sed 's/.txt=//2'`echo $thistestThank you.Nitai--Redakto - Content Management that simply worksContent Management & eBusiness Systems ComputerOil=C2=AE AGDammstrasse 75400 Baden / SwitzerlandTelefon +41 (0)844 44 55 66 info@computeroil.comhttp://computeroil.com > -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On B=ehalf Of> Erol Guneri> Sent: Dienstag, 30. November 2004 13:48> To: WebDNA Talk> Subject: Re: [OT] Shell script> > Hi Nitai,> > Try this:> > ls *.txt | awk '{print("mv "$1" "$1)}' | sed 's/.txt//2'> > This will output a list of move commands onto the screen (to ch=eck it> first). If it looks fine, just add | /bin/sh to the end to mak=e it> execute.> > Erol> > > > ----- Original Message -----> From: "Nitai @ ComputerOil" > To: "WebDNA Talk" > Sent: Tuesday, November 30, 2004 12:30 PM> Subject: [OT] Shell script> > > > Hi all> >> > I know off topic, but maybe someone knows an answer:> >> > I need to substract some text from a variable within a shell=20=script and> cant get it to work. Some code here:> >> > $file =3D myfile.txt> >> > And I need:> >> > $file =3D myfile> >> > Since $file can hold variable filenames I need to get somethi=ng that> just> substract the .txt on each file, so that I just remove the .txt=..> >> > I have tried to get something like this going:> >> > $file =3D substr($file,.txt)> > Or> > $file =3D sub(?,?,?)> >> > Maybe someone can shed some light? TIA.> >> > Nitai> >> > --> > Redakto - Content Management that simply works> > Content Management & eBusiness Systems> >> > ComputerOil=C2=AE AG> > Dammstrasse 7> > 5400 Baden / Switzerland> > Telefon +41 (0)844 44 55 66> >> > info@computeroil.com> > http://computeroil.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 digest@talk.smithmicro.com>> 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/
"Nitai @ ComputerOil"
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:
Kaaaaahhhhhhhnnnnnnn! (1997)
WC2b15 File Corruption (1997)
version 2 for NT (1997)
Solve the Problem, get the code! (2001)
[SearchString] usage (1997)
[ot] New List. Was: Webcat no longer supported? (2006)
404 error -- but wc code executes... (2001)
[sendmail]- bcc? (1998)
Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997)
Page-Execution-Timer...PHP vs WebDNA (2004)
HELP WITH DATES (1997)
WebCat2: Items xx to xx shown, etc. (1997)
off topic - dna snipets (1997)
default error on NT? (1997)
What is WebDNA (1997)
[WebDNA] lighttpd and gzip compression with webdna? (2015)
removing commas from a preformatted number (2000)
[format xs] freeze (1997)
Trouble with formula.db (1997)
Integration? (1999)