diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:56:17 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-11 07:56:17 -0400 |
commit | 9e82c96713989a7565eadac505b36e3dbe91cd5a (patch) | |
tree | 7c2f998cc9d06f97bfe10ce1ee844121b662f595 /.local/bin/yt-fix | |
parent | 3adcf542289a0883924ae9b9be8b898c36702c95 (diff) |
Added, removed, renamed scripts
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 | |||