Fix error messages on MacOS
This commit is contained in:
parent
8b758765a6
commit
348a1550e8
|
@ -61,7 +61,7 @@ function set_resolution() {
|
|||
fi
|
||||
done
|
||||
if [ ${bc_found} -eq 0 ] ; then
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1)
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
|
||||
if [ -z "${file_rel}" ] ; then
|
||||
echo ${set_rel}
|
||||
else
|
||||
|
@ -214,7 +214,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp &> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -61,7 +61,7 @@ function set_resolution() {
|
|||
fi
|
||||
done
|
||||
if [ ${bc_found} -eq 0 ] ; then
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1)
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
|
||||
if [ -z "${file_rel}" ] ; then
|
||||
echo ${set_rel}
|
||||
else
|
||||
|
@ -214,7 +214,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -64,7 +64,7 @@ function set_resolution() {
|
|||
fi
|
||||
done
|
||||
if [ ${bc_found} -eq 0 ] ; then
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1)
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
|
||||
if [ -z "${file_rel}" ] ; then
|
||||
echo ${set_rel}
|
||||
else
|
||||
|
@ -222,7 +222,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -114,7 +114,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -148,7 +148,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
cutDisplayName=$(echo ${DisplayName} | cut -c1)
|
||||
|
|
|
@ -122,7 +122,7 @@ function extractFolderOrFile() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
cutDisplayName=$(echo ${DisplayName} | cut -c1)
|
||||
|
|
|
@ -64,7 +64,7 @@ function set_resolution() {
|
|||
fi
|
||||
done
|
||||
if [ ${bc_found} -eq 0 ] ; then
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1)
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
|
||||
if [ -z "${file_rel}" ] ; then
|
||||
echo ${set_rel}
|
||||
else
|
||||
|
@ -222,7 +222,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -64,7 +64,7 @@ function set_resolution() {
|
|||
fi
|
||||
done
|
||||
if [ ${bc_found} -eq 0 ] ; then
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1)
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
|
||||
if [ -z "${file_rel}" ] ; then
|
||||
echo ${set_rel}
|
||||
else
|
||||
|
@ -222,7 +222,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -64,7 +64,7 @@ function set_resolution() {
|
|||
fi
|
||||
done
|
||||
if [ ${bc_found} -eq 0 ] ; then
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' | head -1)
|
||||
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
|
||||
if [ -z "${file_rel}" ] ; then
|
||||
echo ${set_rel}
|
||||
else
|
||||
|
@ -222,7 +222,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -148,7 +148,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
cutDisplayName=$(echo ${DisplayName} | cut -c1)
|
||||
|
|
|
@ -122,7 +122,7 @@ function extractFolderOrFile() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
cutDisplayName=$(echo ${DisplayName} | cut -c1)
|
||||
|
|
|
@ -115,7 +115,7 @@ function showFileWithSpace() {
|
|||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||
echo $FileNoExtension > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -142,7 +142,7 @@ function showFileWithSpace() {
|
|||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||
echo $FileNoExtension > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -132,7 +132,7 @@ function showFileWithSpace() {
|
|||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||
echo $FileNoExtension > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -115,7 +115,7 @@ function showFileWithSpace() {
|
|||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||
echo $FileNoExtension > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -100,7 +100,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -100,7 +100,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -100,7 +100,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -100,7 +100,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -100,7 +100,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
|
@ -100,7 +100,7 @@ function removeExtension() {
|
|||
# Syntax: showFileWithSpace <file number>
|
||||
function showFileWithSpace() {
|
||||
echo "${1}" > ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
|
||||
DisplayName=$(cat ${dirTemp}/name.tmp)
|
||||
rm -rf ${dirTemp}/name.tmp
|
||||
echo ${DisplayName}
|
||||
|
|
Loading…
Reference in New Issue
Block a user