Re: What language to manipulate text files
- From: Dan Christensen <jdc@xxxxxx>
- Date: Sun, 12 Jun 2005 15:41:52 -0400
ross <rossnixon@xxxxxxxxx> writes:
> What are the ideal languages for the following examples?
>
> 1. Starting from a certain folder, look in the subfolders for all
> filenames matching *FOOD*.txt Any files matching in each folder should
> be copied to a new subfolder within the current folder called EATING
> with a new name of *FOOD*COPY.txt
Bash?
for f in *FOOD*.txt; do cp ${f} EATING/${f}COPY.txt; done
Or "mmv", a linux utility:
mmv '*FOOD*.txt' 'EATING/#1FOOD#2COPY.txt'
For the rest, I personally for choose python.
Dan
.
- Follow-Ups:
- Re: What language to manipulate text files
- From: ross
- Re: What language to manipulate text files
- References:
- What language to manipulate text files
- From: ross
- What language to manipulate text files
- Prev by Date: Re: What is different with Python ?
- Next by Date: Re: How to test if an object IS another object?
- Previous by thread: Re: What language to manipulate text files
- Next by thread: Re: What language to manipulate text files
- Index(es):
Relevant Pages
|