[CentOS] Automatically send CTRL-D

Tue Mar 11 12:35:19 UTC 2008
Mário Gamito <gamito at gmail.com>


Sorry for the little bit off-topic.

I have a script that has to performe a hash over a password.
Problem is that sha512sum expects CTRL-D to be pressed to return to the
command prompt.

I've searched all over Google, but either I didn't do the right search or
there is nothing relevant about this.

Bottom line is that I need this command to print the password hash and
returns to the shell automatically:

$ sha512sum | xargs echo "password" | cut -f2 -d' '

Any help would be appreciated.

Warm Regards,
Mário Gamito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20080311/03c3d52e/attachment-0004.html>