Skip to main content
added 63 characters in body
Source Link

With my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

The output of the script would be the path and filename that best matches the above list, such as. Note that the source files and results have different file extensions:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 

With my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

The output of the script would be the path and filename that best matches the above list, such as:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 

With my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

The output of the script would be the path and filename that best matches the above list. Note that the source files and results have different file extensions:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 
deleted 34 characters in body
Source Link

So far, withWith my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

What I would hope for as theThe output of the script would be, the path and filename that best matches the above list, such as:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 

So far, with my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

What I would hope for as the output of the script would be, the path and filename that best matches the above list, such as:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 

With my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

The output of the script would be the path and filename that best matches the above list, such as:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 
added 530 characters in body
Source Link

So far, with my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

What I would hope for as the output of the script would be, the path and filename that best matches the above list, such as:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 

So far, with my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

So far, with my limited knowledge of Linux tools, I hit a wall. Because my list of files contains spaces (space character), the "find" command fails to find any hits, but does not produce any errors. The reason for this script is to help with (re)transcoding of previously already transcoded files, such as music or movies.

searchdir="/volume2/" filename='list-in.txt' n=1 while read line; do echo "# $n : $line" FILES=${line%.*} find ${searchDir} -iname "$FILES.*" -type f n=$((n+1)) done < $filename 

I'm not sure where to go from here as awk or sed examples I found rarely deal with processing variables.

The input file would contain filenames in the form of:

Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.m4a Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.m4a Supertramp [The Very Best Of Supertramp] -09- Dreamer.m4a 

Not quote delimited, and no paths.

What I would hope for as the output of the script would be, the path and filename that best matches the above list, such as:

/volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -05- Breakfast In America.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -07- Take The Long Way Home.flac /volume2/music/Supertramp/1990. The Very Best Of Supertramp/Supertramp [The Very Best Of Supertramp] -09- Dreamer.flac 
added 18 characters in body
Source Link
Loading
added 50 characters in body
Source Link
Loading
added 436 characters in body
Source Link
Loading
Source Link
Loading