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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:45:06+00:00 2026-05-25T14:45:06+00:00

I have a variable name that is made up of the string orig_endpoints_ with

  • 0

I have a variable name that is made up of the string orig_endpoints_ with the name of a file (sans extension).
I can view this using eval echo like so:

[bash]# PCAP_FILE=test_w_three.pcap
[bash]# orig_endpoints_test_w_three=blah
[bash]# eval echo "\$$(echo orig_endpoints_${PCAP_FILE%.*})"
blah
[bash]# 

Now how do I set this variable to a space separated list of src ips:dst ips? I tried eval set and don’t seem to be having any luck.

[bash]# orig_endpoints_test_w_three=
[bash]# tmpOrig="10.21.20.66:10.21.20.57 10.21.20.66:10.21.22.25 10.21.20.66:10.21.22.51 10.21.20.66:10.65.111.219     10.21.20.66:10.65.111.220 10.21.20.66:10.65.111.30 10.21.20.66:10.65.52.48"
[bash]# eval set orig_endpoints_${PCAP_FILE%.*}=$tmpOrig
[bash]# eval echo \$$(echo orig_endpoints_${PCAP_FILE%.*})

[bash]# echo $orig_endpoints_test_w_three

[bash]#

Would anybody know how I can set this?

  • 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-05-25T14:45:07+00:00Added an answer on May 25, 2026 at 2:45 pm

    Try:

    eval orig_endpoints_${PCAP_FILE%.*}='$tmpOrig'
    

    Quoting is important, the set is unnecessary here AFAICT.

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

Sidebar

Related Questions

I have a string variable that represents the name of a custom class. Example:
I have the following variable that accepts a file name: var xtr = new
I have just discovered a variable name that is misspelled. If it were hidden
I have 4 string variables name, quest, favorite_color, speed that might be empty. I
I've been have trouble understand this problem. If I change the variable name fifthViewController
I have a variable which has the directory path, along with the file name.
Well, I have made a module that allows you to copy a file to
I have a variable name subject. For each unique subject there are 240 response
I have a variable called name stored in another class in the working folder.
I have the following PowerShell loop: Set-Variable -Name YELLOW -Option ReadOnly -Value 0 Set-Variable

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.