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 9149993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:33:11+00:00 2026-06-17T11:33:11+00:00

I am using openssl to encrypt data in a file. In the process of

  • 0

I am using openssl to encrypt data in a file.

In the process of assigning the data in that file to shell variables, I am dynamically decrypting the file and attempting to use awk to parse it into variables.

$ myuser=$(echo | awk '{print $1}' | openssl aes-256-cbc -in encrypted -pass file:../password.txt -d) 
$ echo $myuser 
Bruce-Wayne Batman 0.0.0.0

I should just be echoing Bruce-Wayne but somehow my awk instruction is not working as well as I expect.

Can anyone offer an insight?

  • 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-17T11:33:12+00:00Added an answer on June 17, 2026 at 11:33 am

    You seem to have your piping muddled:

    $ myuser=$(openssl aes-256-cbc -in encrypted -pass file:../password.txt -d | awk '{print $1}')
    

    That is you want the first field in Bruce-Wayne Batman 0.0.0.0 which is effectively:

    echo "Bruce-Wayne Batman 0.0.0.0" | awk '{print $1}'
    

    Doing echo | awk '{print $1}' is the same as doing echo you are piping the output of echo (which is nothing) into awk.

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

Sidebar

Related Questions

I'm trying to use PHP and OpenSSL to encrypt some data using a public
When using blowfish algorithm from openssl library, one can encrypt and decrypt any data.
We know we can encrypt a file with openssl using this command: openssl aes-256-cbc
I have a .bmp image. I wanted to encrypt the image file using openssl
I want to encrypt a file using openssl. I can do it by using
I have to encrypt an xml file using openssl command line or a C
I am trying to take an AES HMAC of a file using the openssl
I could susscessfuly genearte pkcs7 signature using PEM(private key)file in Openssl. But, how do
I'm using PHP's openssl_public_encrypt() to encrypt data using RSA. But it won't encrypt data
I'm trying to write a function, that would use native openssl to do some

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.