Bash: How to concatenate the output of different commands?
I want to concatenate the output of an echo and a grep command, and pipe them to smbclient, which shall send them as a message.
echo "sometext" ; grep searchstring /path/to/file | smbclient -M addressee
The above command printed "sometext" onto the screen, and only piped the output of the grep command to smbclient to send it as a message.
Also, I want to put a newline in the message between the output of the echo and grep commands. (Naturally, newlines in the output of the grep command should also be kept)
Anyone knoing how to do this?
Last edited by J_Szucs; 11-13-2003 at 08:36 AM.