Re: Command line perl to stat a file

2012-02-12 Thread Dr.Ruud
On 2012-02-11 20:33, Harry Putnam wrote: Kevin Spencer writes: On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: But these command line attempts fail: (all on one line) perl -e 'my ($seven, $nine) = (stat('./SweetwatterPk-016.jpg'))[7, 9]; print "$seven and $nine"' outp

Re: Command line perl to stat a file

2012-02-11 Thread Harry Putnam
Kevin Spencer writes: > On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: >> >> But these command line attempts fail: >> >> (all on one line) >>  perl  -e 'my ($seven, $nine) = >>    (stat('./SweetwatterPk-016.jpg'))[7, 9]; >>        print "$seven and $nine"' >> >> output: >>  syntax error a

Re: Command line perl to stat a file

2012-02-11 Thread Harry Putnam
Rob Dixon writes: > Something like this perhaps? > > perl -e "print join ' and ', (stat shift)[7,9]" ./SweetwaterPk-016.jpg Nice... yes Thanks > But I would think the modification time (stat 9) wouldn't be of much > use without formatting it. In this case it was just for a quick command lin

Re: Command line perl to stat a file

2012-02-10 Thread Kevin Spencer
On Fri, Feb 10, 2012 at 10:52 AM, Harry Putnam wrote: > > But these command line attempts fail: > > (all on one line) >  perl  -e 'my ($seven, $nine) = >    (stat('./SweetwatterPk-016.jpg'))[7, 9]; >        print "$seven and $nine"' > > output: >  syntax error at -e line 1, near "stat(." >  Search

Re: Command line perl to stat a file

2012-02-10 Thread Rob Dixon
On 10/02/2012 17:52, Harry Putnam wrote: This script: --- 8< snip -- 8< snip -- 8 Something like this perhaps? perl -e "print join ' and ', (stat shift)[7,9]" ./SweetwaterPk-016.jpg But I would think the modification time (stat 9) wouldn't be of much use without format

Command line perl to stat a file

2012-02-10 Thread Harry Putnam
This script: --- 8< snip -- 8< snip -- 8http://learn.perl.org/