[Hampshire] HERE files and output redirection

Top Page

Reply to this message
Author: Robin Wilson
Date:  
To: Hampshire LUG Discussion List
Subject: [Hampshire] HERE files and output redirection
Hi all,

I have the following code in a batch script:

mpirun -np 6 ./laplace <<END
100
100
100
0.01
100
3
2
1
END
| tail -n 1 > output


What I want it to do is to use the HERE file as input to the mpirun command, and then pipe the output of the mpirun command to the tail command. However, I think the HERE file and tail output things are getting confused.

Any ideas on how should I write this so that it does what I want?

Cheers,

Robin