LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-07-2011, 08:04 AM   #1
congos
LQ Newbie
 
Registered: Oct 2011
Posts: 20

Rep: Reputation: Disabled
Post manipulating files in bash


i want to write a script in bash that will copy files without the end *.* it should add .txt to the files copied and it should also copy files with .html and replace it with .htm
 
Old 10-07-2011, 08:18 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
That's nice. So what have you done so far?

By the way, the bulk renaming of files is one of the most commonly requested scripting goals. You might want to consider doing a few searches to see what advice is out there already.
 
1 members found this post helpful.
Old 10-07-2011, 12:52 PM   #3
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
you should look into commands: find | xargs or even sed to rename
 
1 members found this post helpful.
  


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] Manipulating fixed-column records in bash SL00b Linux - Software 12 07-22-2011 04:11 PM
Manipulating a Date in a perl bash script Jeff1 Programming 10 03-15-2010 09:54 PM
manipulating files tableyou Linux - Newbie 8 11-08-2005 03:38 AM
bash script on manipulating files fiomba Linux - Software 8 10-30-2004 09:31 PM
Manipulating Files in vi Baldorg Linux - General 1 09-19-2003 08:25 PM


All times are GMT -5. The time now is 06:55 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