Bash command -cut (oops last message truncated)
neidorff
neidorff at gmail.com
Mon Sep 18 00:56:40 UTC 2006
Hi,
This baffles me, but should be very simple.
I have a directory with names of audio files. I want to convert from one
audio format to another. No problem there.
I want to create a script to do handle the change of file extension chores.
I came up with this:
#!/bin/bash
FILES=$(ls *.flac | cut -f1 -d\.)
for i in $FILES; do
echo converting: $i
flac -sd $i.flac -o wav/$i.wav
done
The first file is named "01 Introduction.flac" and the problem that I have
is that the first time I go through the for loop, "i" contains "01" the next
time "i" contains "Introduction". Since I set the delimiter (with the -d
option in cut) to "." (escaped) why am I not having "i" contain "01
Introduction" the first time through the for loop? What obvious thing am I
missing here?
Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060917/a464394f/attachment-0001.htm>
More information about the fedora-list
mailing list