This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
sysadminery:bash [2025/05/06 15:32] – adam | sysadminery:bash [2025/05/06 15:32] (current) – adam | ||
---|---|---|---|
Line 2: | Line 2: | ||
the key to memory. the key to memory. the key to memory. | the key to memory. the key to memory. the key to memory. | ||
- | < | + | <code bash> |
if [ 0 ] | if [ 0 ] | ||
then | then | ||
Line 15: | Line 14: | ||
=== loop over files by type === | === loop over files by type === | ||
+ | <code bash> | ||
for i in in *.webm | for i in in *.webm | ||
do | do | ||
echo $i | echo $i | ||
done | done | ||
+ | </ | ||
will echo those files. be aware that you're probably going to want to enclose '' | will echo those files. be aware that you're probably going to want to enclose '' | ||
+ | <code bash> | ||
for i in *.webm | for i in *.webm | ||
do | do | ||
ffmpeg -i " | ffmpeg -i " | ||
done | done | ||
+ | </ | ||
=== mass rename === | === mass rename === | ||
Line 33: | Line 35: | ||
so let's say you found a sick-awesome album. so you've done a nice '' | so let's say you found a sick-awesome album. so you've done a nice '' | ||
+ | <code bash> | ||
ls | rename -d 's/ \[[^]]*\]\./ | ls | rename -d 's/ \[[^]]*\]\./ | ||
+ | </ | ||
pipe '' | pipe '' | ||