Shell Script for encrypting/decrypting text file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell Script for encrypting/decrypting text file
# 1  
Old 05-01-2013
Shell Script for encrypting/decrypting text file

Hello,

I am a newbie in Shell scripting. At the moment, I have a program written in C++ which gives an output file in text format. I would like to write a shell program which can take that output file and encrypt it and later if needed I want to decrypt it.

Could someone please help or suggest me anything?

Thanks a lotSmilie
# 2  
Old 05-01-2013
The Unix zip command can encrypt data, and decrypt the archived file. The gpg command also does encryption and decryption, and is stronger (harder to break).
# 3  
Old 05-01-2013
You can also use openssl.
# 4  
Old 05-01-2013
I am going to try those and let you guys know. Thanks for replying Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Shell script to read lines in a text file and filter user data Shell Programming and Scripting

sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies

2. Programming

Encrypting/Decrypting passwords

I know that simply encrypting and decrypting passwords in a script is as bad as storing them in plain text, but I've been searching for an answer to this for a few days now, and haven't found an answer that fits the problem I'm having. Here's the scenario. I'll give more details than I think may... (3 Replies)
Discussion started by: mdrisser
3 Replies

3. Shell Programming and Scripting

Ignoring file name case and decrypting it.

Dear Friends, I want to decrypt 2 different file types in a folder (ZIP files and GPG files). Each file type need different decryption syntex. Hence, the script should identify file type and should act accordingly ignoring file name case i.e. upper or lower case. Also, the extention can be... (6 Replies)
Discussion started by: anushree.a
6 Replies

4. Shell Programming and Scripting

Shell script for encrypting a string

Hi, I am new to Unix server and shell scripting.I want to encrypt username/password using shell script.I know that there's a Crypt command to encrypt but it is not installed in my unix server and cannot be installed due to some reason.So i want the shell script of the crypt command or is there... (3 Replies)
Discussion started by: Princessp
3 Replies

5. Shell Programming and Scripting

Encrypting a shell script

Hi all, I have one script with me , say automate.sh. I would like to encrypt it, so that no one can see the contents of this script. Can anyone guide me to encrypt/decrypt this script? Regards, akash (1 Reply)
Discussion started by: akash_mahakode
1 Replies

6. UNIX for Dummies Questions & Answers

masking or encrypting in shell script

Hi folks, I am writing a script which asks the user to enter a user name and password to telnet and logon to some other machine. The script promts the user to enter the login name and password as below. echo "Enter the login name to be used to login on the machine" read login echo "Enter the... (4 Replies)
Discussion started by: dshrish
4 Replies

7. Shell Programming and Scripting

decrypting a file using shell script

how do you go about doing this i have a shell script here below but i am not to sure on the process of decrytpting the file. #!/bin/csh # # set am = ‘abcdefghijklm' set am = ‘ABCDEFGHIJKLM' set nz = ‘nopqrstuvwxyz' set NZ = ‘NOPQRSTUVWXYZ' cat $argv | tr $am $AM | tr $NZ $nz | tr $nz $am... (1 Reply)
Discussion started by: master_6ez
1 Replies

8. Shell Programming and Scripting

Encrypting a password for shell script

All, I want to encrypt a database system administration password into a file or environment variable. Then, I want to decrypt the password from the file or environment variable so nobody sees the clear text password. For example, I have the database password of developement. I need to... (1 Reply)
Discussion started by: bubba112557
1 Replies

9. Shell Programming and Scripting

Decrypting Unix file

Accidentally, I encrypted a file while saving it in vi editor. While saving I used :X and when asked for encryption key, I simply pressed ENTER key without any input. Now, I want to decrypt the file. I searched the forum, but unfortunately didn't get the proper solution. In one of the... (1 Reply)
Discussion started by: rkkiran
1 Replies

10. Shell Programming and Scripting

decrypting a file

Accidentally, I encrypted a file while saving it in vi editor. While saving I used :X and when asked for encryption key, I simply pressed ENTER key without any input. I searched the forum, but unfortunately didn't get the proper solution. In one of the threads it asked to visit a particular... (1 Reply)
Discussion started by: rkkiran
1 Replies
Login or Register to Ask a Question