Question: proc1.sh
========

```
#!/bin/sh
touch /tmp/proc1.signature.mutex
#do something for long time
sleep 100 
rm -rf /tmp/proc1.signature.mutex

```

proc2.sh
========

```
#!/bin/sh
touch /tmp/proc2.signature.mutex
#do something for long time
sleep 100 
rm -rf /tmp/proc2.signature.mutex

```

proc3.sh
========

```
#!/bin/sh
touch /tmp/proc3.signature.mutex
#do something for long time
sleep 100 
rm -rf /tmp/proc3.signature.mutex

```

core.sh
=======

Now is there a way to wait for deleting /tmp/proc[?][\*].signature.mutex all such file using loop or something 
and then continue further execution 

How to achieve objective of core.sh

Answer: 
A mutex is a mutual exclusive lock. Your `procN.sh` scripts never test whether the mutex is held by another process before "locking".

If you let `core.sh` start the other scripts, it would be easy for it to wait for the completion of them:

```
#!/bin/sh

./proc1.sh &
./proc2.sh &
./proc3.sh &

wait

# other processing

```

This removes the need for the lock files altogether. If that's not possible, consider

```
#!/bin/sh

while [ -e "$HOME/locks/proc1.signature.mutex" ] ||
      [ -e "$HOME/locks/proc2.signature.mutex" ] ||
      [ -e "$HOME/locks/proc3.signature.mutex" ]
then
    echo 'waiting...'
    sleep 10
done

# other processing

```

To avoid leaving files behind by the `procN.sh` scripts if they die of unnatural causes, use a trap:

```
#!/bin/sh

lockfile="$HOME/locks/proc1.signature.mutex"

while [ -e "$lockfile" ]; do
    echo 'Can not get lock. Waiting...' >&2
    sleep 10
done
## alternatively:
# [ -e "$lockfile" ] && { echo 'something is wrong' >&2; exit 1; }

trap 'rm "$lockfile"; exit' EXIT INT TERM HUP
touch "$lockfile"

# etc.
# no need to rm the lock file at the end

```

Note that there is a space between the `-e "$lockfile"` test and the `touch` in which another process may lock the same file.

To avoid this, use a lock *directory* instead:

```
#!/bin/sh

lockdir="$HOME/locks/proc1.signature.mutex"

while ! mkdir "$lockdir"; do
    echo 'Can not get lock. Waiting...' >&2
    sleep 10
done

trap 'rmdir "$lockdir"; exit' EXIT INT TERM HUP

# etc.
# no need to rmdir the lock dir at the end

```

You may also use a symbolic link in a similar way.

Note that I've used a path under `$HOME` for the lock files/directories. If using `/tmp`, any user could potentially lock your script out of action by simply creating the correct file/directory.
I wrote <https://github.com/acbits/sema> for this exact reason. I haven't been active on SE for a long time and just noticed this question. I have tested it only on Linux