wpa_passphrase redirect to a file if no error

I want redirect wpa_passphrase append to a file if the parameters is valid, leave the err msg to the screen

i use

wpa_passphrase 1 111 2>&1 >>file

wpa_passphrase 1 111111111 2>&1 >>file

but the file still contains the msg and screen did not:

Passphrase must be 8..63 characters

thank you all


Source: shell

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.