I know "encrypt" isn't the right description here. It's more like trying to "obfuscate" or "scramble" a password in a plaintext shell script. Say you have a UNIX shell script that does FTP to Windows ...
There are numerous commands for encrypting files on Linux. When you want to limit access to file contents, you can use file permissions but file encryption makes limiting access much more effective.