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:
error (2000)
What if SSL server down? MAC (1997)
Another question about credit cards (1997)
Question about replacing words (1998)
Webmerchant 3.08: Help! Error Can't open order file. Ignoring (2000)
OT - SMSI complaint (2001)
customer.db and forms (1999)
# fields limited? (1997)
searching for items that begin with a number (2004)
Image Library (2003)
Remove me from your list immeadiately (1998)
generate sequential numbers (2000)
More on the email templates (1997)
A question on sub-categories (1997)
WebCat2b13MacPlugIn - more [date] problems (1997)
Any help gratefully appreciated (2001)
[OT] MS Security Flaw (2000)
AppleScript: Tell application:app location? (1998)
WC2b15 File Corruption (1997)
WebTen? (1997)