Dermot wrote:
Hi,
Hello,
ls | perl -ne 'print if /\.$/'| sed 's/\(.*\)/mv & \1jpg/' | sh I concocted the above command to change files named A1234. to A1234.jpg Is there a pure perl one-liner for this? Just curious.
perl -e'rename$_,"${_}jpg"or warn"$_: $!"for<*.>' John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/