-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_loop
More file actions
46 lines (35 loc) · 1.01 KB
/
bash_loop
File metadata and controls
46 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
///////////////////
ls -1 | parallel convert -normalize -auto-gamma -auto-level {} {}.jpg \;
///////////////////
#!/bin/bash
#split at new line instead of space
IFS=$'\n'
///////////////
for i in $( ls ); do
echo item: $i
done
///////////////
for i in $( cat list ); do
youtube-dl $i
done
///////////////
#Trouver(find) dans le repertoire en cours(./) tous les fichier png(-name "*.png"),
#puis(-exec) extraire leur palette(palette) de couleur sans limite(-t 0) recursivement ({}) et terminer le exec (\;)
/////////////////
find ./ -name "*.png" -exec palette -t 0 {} \;
///////////////
mass rename
///////////////
for var in `find . -type f -name "*(1).m4a"`; do
new=`echo $var | cut -d'(' -f1`;
mv $var $new.m4a;
done
///////////////////
#Remove .1 at end of filename = modify extension
///////////////////
for var in `find . -type f -name "*.1"`; do
new=`echo $var | sed 's/.1//'`;
mv $var $new;
done
///////////////////
ls -1 | parallel convert -normalize -auto-gamma -auto-level {} {}.jpg \;