Ver código fonte

fixed md syntax error

master
Victor Giers 3 anos atrás
pai
commit
682f6197b1
1 arquivos alterados com 11 adições e 7 exclusões
  1. 11
    7
      README.md

+ 11
- 7
README.md Ver arquivo

# Collection of Bash code snippets, mostly one liners, to ease file handling among other things # Collection of Bash code snippets, mostly one liners, to ease file handling among other things
Collection of notes Collection of notes
#### rename files to reverse order
#### rename files to reverse order

```N=1; ls -tr -1 *.jpg | tac | while read file; do mv "$file" "$N".jpg; N=$((N+1)); done``` ```N=1; ls -tr -1 *.jpg | tac | while read file; do mv "$file" "$N".jpg; N=$((N+1)); done```
#### rotate all images using imagemagick
```mogrify -rotate 180 *.jpg```
```mogrify``` overwrites existing images which is what makes it different from ```convert```
#### cut poly-shape out of image, crop image to its boundaries, fill surrounding holes in certain color or transparent (for all jpgs in folder)
```for f in ./*.jpg; do convert "$f" \( -clone 0 -fill black -colorize 100 -fill white -draw "polygon 3276,2421 4945,2407 4956,4708 3287,4722" \) -alpha off -compose copy_opacity -composite -trim +repage 41050648/"$f"_left.jpg; done```
#### do something inside each folder of this folder
#### rotate all images using imagemagick

```mogrify -rotate 180 *.jpg```
```mogrify``` overwrites existing images which is what makes it different from ```convert```
#### cut poly-shape out of image, crop image to its boundaries, fill surrounding holes in certain color or transparent (for all jpgs in folder)

```for f in ./*.jpg; do convert "$f" \( -clone 0 -fill black -colorize 100 -fill white -draw "polygon 3276,2421 4945,2407 4956,4708 3287,4722" \) -alpha off -compose copy_opacity -composite -trim +repage 41050648/"$f"_left.jpg; done```
#### do something inside each folder of this folder

``` ```
for d in */; do for d in */; do
cd $d; cd $d;

Carregando…
Cancelar
Salvar