Hi,there,
I have this expect script so that password can be given via command line
Code:
#!/usr/bin/expect -f
set passphrase [lindex $argv 1]
spawn mcrypt [lindex $argv 0]
expect "passphrase:"
send "$passphrase\r"
expect "passphrase:"
send "$passphrase\r"
expect "encrypted."
(Yes,it's insecure but I have to do the encryption job automatically with cron job.)
It works fine with small files. But when I tried to encrypt a large file which is 3GB . The script terminated before finishing the encryption. Everytime when the size of generated .nc file grew up to 66M also , the script quit.
What's the problem? Is there any resource limit of expect we should take care of ?
Thanks in advance.