Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

printing/echo variable issue

printing/echo variable issue

printing/echo variable issue


I have a script written in korn shell that I am having trouble
to read my variables into an http line that. I've tried placing "\"
in from of the variables but when the script runs it doesn't add
whats being read in. Can anyone suggest the proper way to get
these 2 variables to populate correctly? -Thanks!

echo -n 'Enter JOB name: '
read JOB

echo -n 'Enter CHANNELE B name: '

echo "https://test1.node1.com/cgi-bin/index.pl?function=..._${JOB}_w${GROUPA}&jobid=&server=&group=Group&scheds=ALL" >> out_file.txt

RE: printing/echo variable issue

If you put the code in code tags, it's easier to see and understand...



echo -n 'Enter JOB name: '
read JOB

echo -n 'Enter CHANNELE B name: '

echo "https://test1.node1.com/cgi-bin/index.pl?function=list_job_def&job_name=run_${JOB}_w${GROUPA}&jobid=&server=&group=Group&scheds=ALL" >> out_file.txt 

This code works for me. What are you getting? What ends up in the out_file.txt file that is wrong??

RE: printing/echo variable issue

I found the problem it was actually another line of code that was causing the variable to not populate.
I'll def use tags going forward to make it easier to read.
Thanks for replying SamBone!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close