---
title: "Discussion on \"Bash script to batch convert heic to jpg\" | Hashnode"
description: "Discussion on \"Bash script to batch convert heic to jpg\". mkdir output && for file in *.heic; do heif-convert -q 100 \"$file\" \"output/${file/%.heic/.jpg}\"; done\n\nmkdir -p output && for file in *; do [[ $file == *.heic ]] && heif-convert -q 100 \"$file\" \"output/${file/%.heic/.jpg}\" || cp \"$file\" output/; done"
url: "https://hashnode.com/posts/bash-script-to-batch-convert-heic-to-jpg/643ae14ffe95177ff4023a63"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Bash script to batch convert heic to jpg](https://blog.shreekrishnalamichhane.com.np/bash-script-to-batch-convert-heic-to-jpg?utm_source=hashnode&utm_medium=feed)

mkdir output && for file in \*.heic; do heif-convert -q 100 "$file" "output/${file/%.heic/.jpg}"; done mkdir -p output && for file in \*; do \[\[ $file == \*.heic \]\] && heif-convert -q 100 "$file" "output/${file/%.heic/.jpg}" || cp "$file" output/; done

Apr 15, 2023 · 1 min read · blog.shreekrishnalamichhane.com.np  
Updated Jan 19, 2024  
Read the article

## Written by

[Shree krishna lamichhane](https://hashnode.com/@uniksk)

@uniksk · Kathmandu, Nepal

  
[View profile](https://hashnode.com/@uniksk)

Student | Developer

I am CS Student currently perusing my bachelor degree. I love coding and implementing new logics. Aside from that I'm also a hardware lover and has great interest in IOT.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
