4k4xs4pH1r3 / artemisa

Use of legacy backtick SH-2006
Anti-pattern
Major
a month ago2 months old
10if [ ! -f $numPath/num ]; then
11  echo "0" > $numPath/num
12fi
13num=`cat $numPath/num`14num=$(($num + 1))
15echo $num > $numPath/num
16
 55    write_log "RAW input: '`echo "${REPLY}" | tr -cd '[ -~]'`'"
 56
 57    COMMAND="`echo "${REPLY}" | awk '{print $1}' | tr -cd '\40-\176' | tr 'a-z' 'A-Z'`"
 58    ARGS="`echo "${REPLY}"    | tr -cd '\40-\176' | awk '{for(i=2;i<=NF;i++){printf "%s ", $i};printf "\n"}' | sed 's/ $//'`" 59
 60    write_log "Command: \"${COMMAND}\""
 61    write_log "Arguments: \"${ARGS}\""
 54  if [ "$REPLY" ] ; then
 55    write_log "RAW input: '`echo "${REPLY}" | tr -cd '[ -~]'`'"
 56
 57    COMMAND="`echo "${REPLY}" | awk '{print $1}' | tr -cd '\40-\176' | tr 'a-z' 'A-Z'`" 58    ARGS="`echo "${REPLY}"    | tr -cd '\40-\176' | awk '{for(i=2;i<=NF;i++){printf "%s ", $i};printf "\n"}' | sed 's/ $//'`"
 59
 60    write_log "Command: \"${COMMAND}\""
 52  TIMEOUT=30
 53
 54  if [ "$REPLY" ] ; then
 55    write_log "RAW input: '`echo "${REPLY}" | tr -cd '[ -~]'`'" 56
 57    COMMAND="`echo "${REPLY}" | awk '{print $1}' | tr -cd '\40-\176' | tr 'a-z' 'A-Z'`"
 58    ARGS="`echo "${REPLY}"    | tr -cd '\40-\176' | awk '{for(i=2;i<=NF;i++){printf "%s ", $i};printf "\n"}' | sed 's/ $//'`"
 33    echo '---'  >>${LOGFILE}
 34  fi
 35  let LINES+=1
 36  [ ${LOGGING} = 0 ] || echo -e "`date '+%b %d %H:%M'` pop3 $*" >>${LOGFILE} 37}
 38
 39ANSWER="+OK Fake POP3 Service Ready"