linux - preventing scripts from stopping on errors -


my issue rather simple one, haven't found satisfactory answer anywhere i've looked far.

i have script runs program/script, when encounters error hangs , not continue along. what best method fix this?

to clarify, there no output when hangs there error message, depending on script using work on data set.

example script:

#!/bin/bash # iterate on nul-delimited stream of directory names while ifs='' read -r -d '' dirname;   # ...then list files in each directory:   file in "$dirname"/*;     # ignore directory contents not files     [[ -f $file ]] || continue     # run analysis tool     if [[ $file == *.dmp ]];       echo $dirname;       tshark -pvx -r "$file" >> $dirname/text_out.txt #with packet summary line, packet details expanded, packet bytes       #ls $dirname;       echo "complete";       continue     fi   done done < <(find . -type d -print0) 

in nutshell, asking - how handle if child process hangs (from parent perspective). if basic issue facing, can check link. hth!


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -