[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problem with \n and variables in bash script



HI!!!!


I have this bash script:

#!/bin/bash

--------------------------------------------------------------------------------

SALIDA=$(diff file1 file2)

if [ $? == 1 ]
then
   echo -e $SALIDA | mail -s variable my_email
   diff file1 file2 | mail -s directly my_email
fi

--------------------------------------------------------------------------------

Well, when i get the emails, the one with subject "variable" it is in ONE line
but the one with subject "directly" is display correctly.


So my question is how to get \n processed with variables.


 Thanks....



Reply to: