[ LUGOS ] Sortiranje poste

Ales Horvat ales.horvat na nevtron.si
Pet Avg 21 07:41:04 CEST 1998


Metod Kozelj wrote:

> RCVDFROM=`cat ${TMP} | ${FORMAIL} -r -i From | grep From | head -n 1`
> /bin/echo "${SUBJECT}\n${RCVDFROM}\n${RCVFSUBJECT}" | ${SENDMAIL} ${SENDMAILFLAGS} > GdjeSiMujo na linux.mobitel.si
...
...

Tnx. Bom probal ta vikend, ker sem trenutno prevec zaseden. :/

> Pojasnilo: mora biti /bin/echo, saj shellov echo navadno ne expanda
> kontrolnih znakov (\n --> <new line>).

Man echo pravi:

       -e     Enable interpretation of the following backslash-escaped
characters in the strings:
              \a     alert (bell)
              \b     backspace
              \c     suppress trailing newline
              \f     form feed
              \n     new line
              \r     carriage return
              \t     horizontal tab
              \v     vertical tab
              \\     backslash
              \nnn   the character whose ASCII code is nnn (octal)

Torej: 
$ echo -e "\nBye,\n\tA.\n"

Bye,
        A.




Dodatne informacije o seznamu Starilist