[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: automated editing of text files



Hi Tom (and others)

>> Ok, I've got most of it. The last part is more of a bash problem I think
as
>> most of the files have spaces in them. Not my idea, it's how the files
were
>> delivered to me. :-(
>>
>> So the command line:
>>  for i in `ls *.txt` ; do ./add-pre-nl.sh $i; done
>> does not cut it as it chops the filesnames up and issues each part to the
>> add-pre-nl script. :-(
>> If I just use
>>  ./add-pre-nl.sh file\ name\ with\ spaces.txt
>> it will produce the result I want.

> Use "$i" for the filenames with spaces to remain whole.

Hmmm, that simple. Ok, thanks guys/gals, that did the trick. Turns out is I
do not need the ls thing either just:
  for i in *.txt ; do ./add-pre-nl.sh "$i"; done

Bonno




Reply to: