Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8279383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:19:13+00:00 2026-06-08T09:19:13+00:00

I am having problems using a program called ‘ccrypt’ which is used to encrypt

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:19:15+00:00Added an answer on June 8, 2026 at 9:19 am

    Don’t forget to export the environment variable (until it is exported, it is just a variable, not an environment variable).

    export cryptograph="Example_passphrase"
    ccrypt -e -E cryptograph `find . -type f | sed -n -e '$i{p;q}'`
    

    Specifying just the name is crucial (no $). Otherwise, the value of the variable — the passphrase itself — is in the command line arguments and visible to ps etc. We can debate whether the environment is secure (think of the /proc file system), but it is several steps better than including the passphrase itself on the command line.


    From the comments, it appears that you might be best off doing something like:

    find . -type f -exec ccrypt -e -E cryptograph {} ';'
    

    One major advantage of this is that it sidesteps all the problems with blanks and other odd-ball characters in file names. If the ccrypt command accepts multiple files, you can probably replace the quoted ';' with + (which doesn’t need quotes) and a single command will encrypt all the files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems with a third-party program which is using FindWindow() to find if
I'm having problems compiling the following program. I'm using gcc -framework Foundation inherit8.1m and
I'm having problems in using message queues in this program it is supposed to
I'm having problems using fopen in php. If I open the desired URL by
I am having problems using my custom class with a std::map. The class dynamically
I am having problems using the update method of scala.collection.immutable.HashMap.I don't see the reason
I'm having some problems using cascade operations on hibernate. I have one entity (TripleDBmodel),
I'm having some problems while using PDO. It all seems correct but I am
I'm using RichFaces and I'm having problems with the fileUpload flash component + IE
I'm having problems reading this one JPEG file using ImageIO.read(File file) - it throws

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.