LINUX.ORG.RU

История изменений

Исправление vodz, (текущая версия) :

#!/bin/bash

IFS='
'

convert() {
        realpath "$1" >> DTS_videos.txt
        echo ffprobe "$1" ... >> DTS_videos.txt
}

scan() {
        local i p

        for i in `ls "$1/*.mkv"`; do
                p="$1/$i"
                if [ -d "$p" ]; then
                        scan "$p"
                fi
                if [ -f "$p" ]; then
                        convert "$p"
                fi
        done
}

scan "."

Исправление vodz, :

#!/bin/bash

IFS='
'

convert() {
        realpath "$1" >> DTS_videos.txt
        echo ffprobe "$1" ... >> DTS_videos.txt
}

scan() {
        local i p

        for i in `ls "$1/*.mpg"`; do
                p="$1/$i"
                if [ -d "$p" ]; then
                        scan "$p"
                fi
                if [ -f "$p" ]; then
                        convert "$p"
                fi
        done
}

scan "."

Исходная версия vodz, :

#!/bin/bash

IFS='
'

convert() {
        realpath "$1" >> DTS_videos.txt
        echo ffprobe "$1" ... >> DTS_videos.txt
}

scan() {
        local i p

        for i in `ls "$1"`; do
                p="$1/$i"
                if [ -d "$p" ]; then
                        scan "$p"
                fi
                if [ -f "$p" ]; then
                        convert "$p"
                fi
        done
}

scan "."