1
0

made more current

This commit is contained in:
2023-12-18 12:47:55 -07:00
parent 500b47fd9a
commit 2f4b65e84b
10 changed files with 74 additions and 29 deletions

View File

@@ -1,18 +1,21 @@
#!/bin/sh
bmv() {
set -x
if test -z "$1"; then
printf "Usage: %s [files pattern]...\n" "$0" 1>&2
printf "Usage: %s pattern pattern1 [pattern2]\n" "$0" 1>&2
return 64 # sysexits.h(3) EX_USAGE
fi
while test -n "$2"; do
for file in $1; do
mv "$file" "$(printf "%s" "$file" | sed "s/\$2//g")"
done
for file in $1; do
newfile="$(printf '%s\n' "$file" | sed "s;$2;$3;g")"
shift 2
if [ "$file" != "$newfile" ]
then
mv "$file" "$newfile"
fi
done
set +x
}
ix() {
@@ -23,6 +26,16 @@ myip() {
curl icanhazip.com
}
honse() {
if test -z "$2"; then
printf "Usage: %s season episode\n" "$0"
return 64 # syexits.h(3) EX_USAGE
else
mpv "https://ypdl.gdn/files/YP-1S-$1x$2.mkv"
fi
}
#TODO: Really needs fixed
paclean() {
for package in `pacman -Qtq`; do
pacman -Qi "$package"
@@ -41,16 +54,13 @@ paclean() {
su -c "pacman -Rns $packages"
}
sc() {
if test -z "$1"; then
printf "Usage: %s URI...\n" "$0" 1>&2
printf "Usage: %s URI\n" "$0" 1>&2
return 64 # sysexits.h(3) EX_USAGE
fi
while "$1"; do
scdl --original-name --debug -l "$1" >> log 2>&1
done
scdl --original-name --debug -l "$1" >> log 2>&1
}
up() { # updates everything on the system