Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-14-2007, 08:23 PM   #1
LQ Newbie
Registered: Jan 2007
Posts: 10

Rep: Reputation: 1
Exclamation converting file encoding (batch files) with same output filename

Hello everybody :-) this is my first post and I`m new to Linux.

I have a problem on how to convert *.java files in a huge directory structure.
from SHIFT_JIS -> UTF-8

and when converted, the converted file must be the same input filename
I do also need to a recursive find for this one..

my logic is this one:
1. find *.java files in directory / subdirectory -> recursive find
2. if match
iconv -f SHIFT_JIS -t UTF-8 inputFileName > outputFileName

I don`t know how to implement [ inputFileName > outputFileName ]? :-(
and the recursive find..


Old 01-14-2007, 08:32 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Read the info find manual. You probably want to use the "-execdir <command>" argument.


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
i want to convert .wav file into mp3 files in batch mode sparsh Linux - Software 6 11-20-2007 10:53 AM
Batch converting video files rudlavibizon Linux - Desktop 6 12-01-2006 04:25 AM
using commands to output path, filename and info to a txt file bob_man_uk Linux - General 3 05-11-2006 02:31 PM
How to know encoding used for filename synna Programming 1 12-22-2004 09:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:17 PM.

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