bash : name : fix specifying names with spaces.
This commit is contained in:
parent
523404ecb3
commit
da36d0093f
|
@ -5,6 +5,7 @@ name()
|
|||
local files="$@"
|
||||
local count=0
|
||||
local total=$#
|
||||
local IFS=$'\n'
|
||||
|
||||
# all files except hidden by default.
|
||||
if [[ "${files}" = "" ]]; then
|
||||
|
@ -57,6 +58,7 @@ name_hash()
|
|||
local files="$@"
|
||||
local count=0
|
||||
local total=$#
|
||||
local IFS=$'\n'
|
||||
|
||||
# all files except hidden by default.
|
||||
if [[ "${files}" = "" ]]; then
|
||||
|
@ -109,6 +111,7 @@ name_hash_check()
|
|||
local count=0
|
||||
local total=$#
|
||||
local failed=0
|
||||
local IFS=$'\n'
|
||||
|
||||
# all files by default.
|
||||
if [[ "${files}" = "" ]]; then
|
||||
|
@ -158,6 +161,7 @@ name_series()
|
|||
local files="${@:2}"
|
||||
local count=0
|
||||
local total=$#
|
||||
local IFS=$'\n'
|
||||
|
||||
# error when no season number specified.
|
||||
if [[ "${season}" = "" ]]; then
|
||||
|
@ -200,6 +204,7 @@ name_manga()
|
|||
local count=0
|
||||
local total=$#
|
||||
local manga="${PWD##*/}"
|
||||
local IFS=$'\n'
|
||||
|
||||
# error when no season number specified.
|
||||
if [[ "${season}" = "" ]]; then
|
||||
|
@ -241,6 +246,7 @@ name_ext()
|
|||
local files="${@:2}"
|
||||
local count=0
|
||||
local total=$#
|
||||
local IFS=$'\n'
|
||||
|
||||
# error when no new extension specified.
|
||||
if [[ "${extension}" = "" ]]; then
|
||||
|
|
Reference in a new issue