This shows you the differences between two versions of the page.

Link to this comparison view

development:bash:ifs [2018/12/17 20:16] (current)
preb created
Line 1: Line 1:
 +==== Internal Field Separator ====
 +By default the shell uses white space to split field in a variable. \\
 +To avoid this we can define an alternate IFS value. \\
 +Here is a script which reads all the flac files in a directory and converts them to mp3, renaming them at the same time.
 +for a in `ls *.flac`
 +b=`echo ${a} | sed '​s/​flac/​mp3/'​`
 +ffmpeg -i ${a} -qscale:a 0 ${b}