diff options
Diffstat (limited to '.local/bin/yt-fix')
-rwxr-xr-x | .local/bin/yt-fix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/.local/bin/yt-fix b/.local/bin/yt-fix index 69e771a..efb76ad 100755 --- a/.local/bin/yt-fix +++ b/.local/bin/yt-fix | |||
@@ -7,7 +7,7 @@ stdin() { | |||
7 | do | 7 | do |
8 | ext=".$(echo $infile | rev | cut -d '.' -f 1 | rev)" | 8 | ext=".$(echo $infile | rev | cut -d '.' -f 1 | rev)" |
9 | ext_length=${#ext} | 9 | ext_length=${#ext} |
10 | remove=$((12+$ext_length)) | 10 | remove=$((15+$ext_length)) |
11 | filename="$(echo $infile | rev | cut -c $remove- | rev)" | 11 | filename="$(echo $infile | rev | cut -c $remove- | rev)" |
12 | mv "$infile" "$filename$ext" | 12 | mv "$infile" "$filename$ext" |
13 | done | 13 | done |
@@ -18,7 +18,7 @@ cli() { | |||
18 | do | 18 | do |
19 | ext=".$(echo $infile | rev | cut -d '.' -f 1 | rev)" | 19 | ext=".$(echo $infile | rev | cut -d '.' -f 1 | rev)" |
20 | ext_length=${#ext} | 20 | ext_length=${#ext} |
21 | remove=$((12+$ext_length)) | 21 | remove=$((15+$ext_length)) |
22 | filename="$(echo $infile | rev | cut -c $remove- | rev)" | 22 | filename="$(echo $infile | rev | cut -c $remove- | rev)" |
23 | mv "$infile" "$filename$ext" | 23 | mv "$infile" "$filename$ext" |
24 | done | 24 | done |
@@ -39,4 +39,3 @@ do | |||
39 | done | 39 | done |
40 | 40 | ||
41 | [ $read_stdin -eq 0 ] && cli "$@" || stdin | 41 | [ $read_stdin -eq 0 ] && cli "$@" || stdin |
42 | |||