LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-04-2017, 12:47 AM   #1
Alena
LQ Newbie
 
Registered: Oct 2017
Posts: 1

Rep: Reputation: Disabled
Exclamation changing files extensions using inplace edit (perl)


Please help... I need to change a few files extensions using inplace edit (perl) and create a backup files. Thank you in advance.
 
Old 10-04-2017, 10:41 AM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Posts: 1,375

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
Is this just a bulk file rename? Are the files perl code files or are you asking how to do this in perl?
 
Old 10-04-2017, 02:39 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,424
Blog Entries: 13

Rep: Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741Reputation: 3741
The Linux rename command uses perl expressions to perform it's actions.

Therefore Alena: Welcome to LQ. And you'll have to share a bit more about the exact details you wish to accomplish. Such as something like, "I wish to rename all JPG files to BAK files", or something specific. From there we can give you an idea what the perlexpr would be like for that rename command instance.
 
1 members found this post helpful.
Old 10-04-2017, 02:48 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,315

Rep: Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017Reputation: 6017
Quote:
Originally Posted by Alena View Post
Please help... I need to change a few files extensions using inplace edit (perl) and create a backup files. Thank you in advance.
Ok...so since you need this in Perl, just post what you've done/tried/written on your own, and tell us where you're stuck. Lots of ways to do this. Also, provide us with some sample file names for input and what you want for output.

Otherwise, read the "Question Guidelines": we're happy to help you, but we aren't going to write a script/procedure for you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Not able to edit multiple files by perl -pi -e! ravisingh1 Programming 5 07-20-2013 01:45 PM
How to edit my extensions.conf located on remote host myasir_genious Linux - Software 3 02-04-2011 10:56 AM
Mass edit files using perl script BabySunny Linux - Newbie 10 02-03-2011 12:30 PM
Epiphany browser: Edit > Site Permissions (Extensions) dpeirce Linux - Software 1 04-02-2008 12:26 AM
MythTV Edit Audio Extensions or solution to mp4ff_open_read carl0ski Linux - Software 0 12-03-2005 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration