From 0bb9a87a524ba1233d28d3fcbfb76012bb95147a Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 20 Jan 2021 12:19:02 +0100 Subject: [PATCH] fixed md syntax error --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7849825..dbd44f3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Collection of Bash code snippets, mostly one liners, to ease file handling among other things Collection of notes #### 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 @@ -9,9 +10,11 @@ Collection of notes `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 cd $d;