Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a bash script that pipes a file through pipe viewer to watch encryption progress. However, whenever I use aescrypt in the pipeline with pv, I get an error about not matching passwords. If the password is explicitly specified in plaintext on the command line, I don't have this problem (obviously), but this is very insecure. BTW, my test password was the single character 'a', so they did indeed match on input.

It is not supported either way:

$ pv -cN Encryption test.tar | aescrypt -e - -o test.tar.aes  
Enter password:   
Re-Enter password:    
Error: Passwords don't match.  
$ aescrypt -e test.tar | pv -cN Encryption >| test.tar.aes  
Enter password:   
Re-Enter password:   
Error: Passwords don't match.

However, this functions correctly (no pv):

$ cat test.tar | aescrypt -e - -o test.tar.aes

This functions as well (well, it writes the file correctly):

$ cat test.tar | pv -cN encryption | aescrypt -e - -o test.tar.aes  
Enter password: a  
Re-Enter password: a

When I put in the password, it is displayed in plain text on the screen.

Aescrypt is advertised to fully support the Linux pipeline. To my knowledge, pv only counts what data is passing through it, but doesn't modify it. What's wrong here?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.