ITT We post useful bash scripts
ITT We post useful bash scripts
echo 1
Not bash but I love this script for extracting files
tar.xz is not accounted for though
#! /usr/bin/fish
function extract --description "Expand or extract bundled & compressed files"
set --local ext (echo $argv[1] | awk -F. '{print $NF}')
switch $ext
case tar # non-compressed, just bundled
tar -xvf $argv[1]
case gz
if test (echo $argv[1] | awk -F. '{print $(NF-1)}') = tar # tar bundle compressed with gzip
tar -zxvf $argv[1]
else # single gzip
gunzip $argv[1]
end
case tgz # same as tar.gz
tar -zxvf $argv[1]
case bz2 # tar compressed with bzip2
tar -jxvf $argv[1]
case rar
unrar x $argv[1]
case zip
unzip $argv[1]
case '*'
echo "unknown extension"
end
end
echo 2
thanks
you know that both BSD Tar and GNU Tar can determine the compression most times without any extra flags, right?
wow not even an overtly 'hidden' rimraf, gj user
so I can just use tar x?
The script still serves zip and unrar
yes &
yes.
no even better
`yes`
note the `
sudo apt install gentoo
lynx -dump -listonly $1 | grep '\. https\?://.*\.\(webm\|gif\|jpg\|jpeg\|png\)$' | grep 'https\?://i.4cdn.org/' | awk '{print $2}' | sort | uniq
you can put the two greps together if you want; it's generated from a tool
Sudo kill 1
>Bash script for translating binary to hexadecimal.
echo -e "Enter your binary code: \c"
read BINARY
for (( ; ; ))
do
printf '%x\n' "$((2#$BINARY))"
exit $?
done
no offense, but you know xxd is a thing, right?
Only weather tool necessary:
#! /bin/bash
# will auto determine location, if a specific location is desired insert city name
if [ $# -ne 1 ]
curl wttr.in
else
curl wttr.in $1
Here's a fish function that I use to edit the subtitle script of an mkv without manually demuxing it.
You can use it like so
vim {subedit weebshit.mkv)
pastebin.com
bash and zsh babbies need not apply.
Only weather tool necessary:
#! /bin/bash
# will auto determine location, if a specific location is desired insert city name
if [ $# -ne 1 ]
curl wttr.in
else
curl "wttr.in/$1"
Had to fucking up the last line
>using anything but POSIX compliant shell scripts
#!/bin/bash
sh /fuck/your/mom.sh
#! /bin/bash
# police after you? Say goodbye!
rm -rf /*
and even then you didn't get it right
#! /bin/bash
# will auto determine location, if a specific location is desired insert city name
if [ $# -ne 1 ]
then
curl wttr.in
else
curl "wttr.in/$1"
fi
here some stuff i use
duckducksearch(){ search=$@; firefox -url "duckduckgo.com
and
4chanwebmconvert(){
if [[ $# == 2 ]]
then
ffmpeg -i $1 -c:v libvpx -an -c:a libvorbis $2
else
echo "input file"
read i
echo "output file"
read o
ffmpeg -i $i -c:v libvpx -an -c:a libvorbis $o
fi
}
bump, I'm about to post a script but I gotta make sure it works 100%
You'll need openmpt123.
#!/bin/bash
#modradio.sh
while true; do
random_mod_number="$(curl lite.modarchive.org
I knew I copied the wrong one. Use this instead:
#!/bin/bash
#modradio.sh
while true; do
random_mod_number="$(curl lite.modarchive.org
?? I copied the wrong one again.
#!/bin/bash
#modradio.sh
while true; do
random_mod_number="$(curl lite.modarchive.org
it's called 'unp' you huge doofus
linuxpoison.blogspot.com