Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
res=`dnf search "$1" 2>&1`
if [ $? -eq 0 ]; then
i=0
while read -r line; do
if [[ "$line" =~ " : " ]]; then
((i++))
IFS=':' read -r -a pkg <<< "$line"
pkgi="${pkg[0]}"
pkgi=${pkgi//[[:blank:]]/}
@Koitharu
Koitharu / 2vorbis.sh
Created October 13, 2017 13:31
Batch convert files to vorbis
#!/bin/bash
let succesf=0
let failf=0
for f in "$@"
do
printf "Processing $f... "
out="${f/%mp3/ogg}"
ffmpeg -i "$f" -c:a libvorbis -b:a 128k "$out" -y -vn -loglevel panic
if [ $? -eq 0 ]; then
olds=`du -h "$f" | cut -f1`