linux - mail command not found error while script execution -


below code working on, trying trigger mail when enters if block

#!/bin/bash toaddr2="harigm@gmail.com" # main routine export path=/usr/bin:/usr/local/bin ssh -o passwordauthentication=no -q psoft@123.34.71.238 exit test=$? echo "return value  $test"  set path=/usr/bin:$path mail $toaddr2 -s "this subject" 

when execute above code, getting mail command not found using bash , tried setting path well.

i tried mailx command well, got same error not worked, clue one, might issue.

given it's bash script, wanted say

export path=/usr/bin:${path} 

instead of

set path=/usr/bin:$path 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -