guide needed to combine 2 variables


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting guide needed to combine 2 variables
# 1  
Old 10-01-2012
guide needed to combine 2 variables

Code:
readNOW=$(date +"%Y%m%d%H%M")
 
read readTerminal #input B
terminalc=$readTerminal
 
echo eqpt_list_QC_$terminalcT_$readNOW

how to get display result it:

eqpt_list_QC_BT_201209121530
# 2  
Old 10-01-2012
try this..

Code:
echo eqpt_list_QC_"$terminalc"T_"$readNOW"

and you can use $readTerminal directly.. no need to define another variable..

Code:
echo eqpt_list_QC_"$readTerminal"T_"$readNOW"

This User Gave Thanks to pamu For This Post:
# 3  
Old 10-01-2012
thanks Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Needed: UNIX shell variables to store Oracle table records

Hello Folks, I'm working on a requirement to automate the process of generating report(csv file) using metadata info stored in an Oracle table and E-mail it to respective people. Meta data table: Report_ID,Report_SUB_ID,Report_DB,Report_SQL,Report_to_email_Id 1,1,DEV,'select * From... (2 Replies)
Discussion started by: venkat_reddy
2 Replies

2. UNIX for Dummies Questions & Answers

Combine two lists of variables

Thanks in advance for any advice and help. I have two lists of variables that I want to put into nested for loops. for x in 1 2 3 do for y in a b c do The output I want is: filepath/1/ command modified by a filepath/2/ command modified by b filepath/3/ command modified by c To... (10 Replies)
Discussion started by: wheyhamp
10 Replies

3. Programming

sql guide needed

SQL> select 2 distinct qc_m|| ',' || 3 to_char(logon_dt, 'YYYY-MM-DD HH24:MI:SS')|| ',' || 4 CASE WHEN logon_dt IS NOT NULL THEN 'LOGON' ELSE 'LOGOFF' END 5 from qc_ct2 qc left join v_tls_equipment_logon tls on qc.qc_m=tls.equipment_id where 6 qc.terminal_c='T'and... (1 Reply)
Discussion started by: ment0smintz
1 Replies

4. UNIX for Dummies Questions & Answers

Guide me please

Hi All, I am kinda struck at one point :wall: need ur help to move further. Query: My inputs files are Expected output: I am sure there should be similar tread relating my query ..but as i couldnt find the details i am posting again. Please direct me to the tread or reply... (1 Reply)
Discussion started by: unibeginner
1 Replies

5. Shell Programming and Scripting

Help needed in perl; moving or copying the variables

Hi All, I have a perl script blc.pl; i have five variables a,b,c,d and e in this script. Now I want to copy the values of these variables into a data file,say abc.dat.. Can anybody please tell me how to do this? Any help is appreciated.. Thanks in advance (2 Replies)
Discussion started by: puneetkanchi
2 Replies

6. Shell Programming and Scripting

combine variables in one

Within one of my scripts, I have variables extracted from parameters list and want to combine some of them in one (lpath). I tried using awk command..... How do I get it? Thank you. #!/bin/bash # ## Read paramlist.txt file='/name1/name2/paramlist.txt' while read line do # key= echo... (4 Replies)
Discussion started by: Lenora2009
4 Replies

7. Shell Programming and Scripting

awk : combine 3 variables into 1

Within one of my awk scripts, I have three variables extracted and calculated on. When done, I simply want to combine the three. The following works, but looks weird. My script reads a field that has text and numbers, knowing the last four comprise MMYY (month and year) # YY are last two... (2 Replies)
Discussion started by: joeyg
2 Replies

8. Programming

How to convert byteArray variables to HexaString variables for Linux?

Hello everybody, I am having problem in converting byte array variables to Hexa String variables for Linux. I have done, converting byte array variables to Hexa String variables for Windows but same function doesn't work for linux. Is there any difference in OS ? The code for Windows is given... (2 Replies)
Discussion started by: ritesh_163
2 Replies

9. Shell Programming and Scripting

Help needed to combine files to excel sheet

Hi, I have several hundreds of text files which I would like to combine them onto excel sheet. Does anyone know how to combine them into different excel sheet in one workbook using Bash script? Please advise. THanks. I forgot to mention my file is something like below:- A B ... (5 Replies)
Discussion started by: ahjiefreak
5 Replies

10. Shell Programming and Scripting

Help needed in processing multiple variables in a single sed command.

Is it possible to process multiple variables in a single sed command? I have the following ksh with three variables and I want to search for all variables which start with "var" inside input.txt. I tired "$var$" but it just prints out everyting in input.txt and does not work. $ more test.ksh... (5 Replies)
Discussion started by: stevefox
5 Replies
Login or Register to Ask a Question