Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing/echo variable issue

Status
Not open for further replies.

grazinggoat

Programmer
Mar 12, 2008
41
US
Hello,

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: '
read GROUPA

echo " >> out_file.txt
 
If you put the code in code tags, it's easier to see and understand...

Code:
#!/bin/ksh

echo -n 'Enter JOB name: '
read JOB

echo -n 'Enter CHANNELE B name: '
read GROUPA

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

This code works for me. What are you getting? What ends up in the [tt]out_file.txt[/tt] file that is wrong??
 
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!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top