I am having problems using a program called 'ccrypt' which is used to encrypt files. The way in which I am using it is as follows:
ccrypt -e -E $cryptograph `find . -type f | sed -n -e '$i{p;q}'`
where -e
means that the program is running in encrypt mode. My problem is as follows:
The manual for the command says that -E
is used to read the passphrase for the encryption from an environment variable using this syntax:
-E var
and as such I have set it to be the passphrase I want as below:
cryptograph="Example_passphrase"
However, when I run the code as shown above, an error message appears as follows:
ccrypt: environment variable Example_passphrase does not exist.
Does anybody have any idea what I am doing wrong?
EDIT: Thanks for the answers, exporting the variable and removing the "$" worked but now I face a new problem:
"sed -n -e '$i{p;q}'"
The shell says:
ccrypt: {p;q}: No such file or directory
However, if I exchange $i for a number then the program works to an extent. What is the correct syntax for using the variable 'i' here?