I want to mail the output of this command
df -k | sort -rk4 | head -2 | tail -1
to xyz@gmail.com and i want to print the output in the command prompt also
How to do
TIA
I want to mail the output of this command
df -k | sort -rk4 | head -2 | tail -1
to xyz@gmail.com and i want to print the output in the command prompt also
How to do
TIA
tee /dev/tty
?
out=`df -k | sort -rk4 | sed -n 2p`
echo "$out"
echo "$out" | mail ...
i used this but the output is not coming in mailbox
out=`df -k | sort -rk4 | sed -n 2p`echo "$out"echo "$out" | mail ...
Please use code tags as required by forum rules!
Are you sure that was your command line? Where would you expect it to mail to?
Does this do what you want?
df -k | sort -rk4 | sed -n 2p | tee | mail ...