Skip to content

Marp and inotifywait #563

@nkpap

Description

@nkpap

Hi all,
I try to run the following bash script but it doesn't create any pdf. However if the invoked command is marp --version it is executed. The same applies if the command to be executed is cp $FILE $FILE.pdf excluding any file permission issues.

#!/bin/bash

# Use inotifywait in a loop
inotifywait -m -e modify --format '%w%f' *.md | while read FILE
do
  echo "Changed file: $FILE and ${FILE%.md}.pdf"
# command
  marp $FILE  -o ${FILE%.md}.pdf
done

Am I missing something?
Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions