mpg123 script

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

 



Hi Igor,

	I think if you do something like:
${i}text
That will do what you want it to. HTH.

Garrett

On Sun, May 16, 2004 at 
01:01:41AM -0400, Igor Gueths wrote:
> Hi all. I recently attempted to create a script that would cat a list of mp3 files to mpg123, and then subsequently re-name the output files substituting in $i. For example, file1.wav. The 
> script I had went something like:
> #!/bin/bash
> for textfile in `cat $1`; do
> for i in
> do
> i+=1 #increment i by 1 for later substitution
> done
> mpg123 -@ $textfile -w file$i.wav
> done
> I then found that mpg123, upon being run with the script, said "./d: no such file or directory."
> Is there even a way to substitute $i in the middle of a filename to reflect the value of i? I know how to do this in other languages, however Bash doesn't seem to provide a method of doing 
> this. Btw I thought of writing the script in either C or Perl, however I thought that the simplicity of the task I was trying to accomplish didn't really justify the overhead. Anyone have any 
> ideas on possibly modifying this script so that it would actually work? Thanks!
> -- 
> Failure is not an option, it comes bundled with your Microsoft product.
> 
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux