Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #189522

Re: inotifywait in bash script: space

From "B.M." <b-misc@gmx.ch>
Newsgroups linux.debian.user
Subject Re: inotifywait in bash script: space
Date 2017-12-03 20:20 +0100
Message-ID <uSHXX-3dJ-3@gated-at.bofh.it> (permalink)
References <uSiPU-3Ix-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Dear all,

thank you for your inputs - indeed, I had to add "eval" to my script to get it 
working.

Best,
Bernd


On Samstag, 2. Dezember 2017 17:10:10 CET you wrote:
> Dear all,
> 
> not a Debian specific question, but I hope to get an answer here...
> 
> I try to use inotifywait in a bash script to block until a file in a
> directory gets changed. Then the script should continue. That's working
> well unless the path I hand over to inotifywait contains spaces.
> 
> I already tried to escape them like so:
> 
>   MYCOMMAND = "inotifywait  -qqr -e create \"$MYDIR\""
> 
> where MYDIR is something like "/tmp/test dir" but although echo shows the
> command correctly and putting the very same command in a shell just works,
> as part of my script it doesn't work. (I don't want to get paths back from
> inotifywait.)
> 
> Thanks for any pointers towards clarification and help.
> 
> Best,
> Bernd

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

inotifywait in bash script: space "B.M." <b-misc@gmx.ch> - 2017-12-02 17:30 +0100
  Re: inotifywait in bash script: space "Thomas Schmitt" <scdbackup@gmx.net> - 2017-12-02 18:00 +0100
  Re: inotifywait in bash script: space "B.M." <b-misc@gmx.ch> - 2017-12-03 20:20 +0100
  Re: inotifywait in bash script: space davidson <davidson@freevolt.org> - 2017-12-06 01:20 +0100

csiph-web