Sponsored Content
Full Discussion: Concatenating Variables
Top Forums Shell Programming and Scripting Concatenating Variables Post 35539 by photh on Wednesday 16th of April 2003 04:35:59 PM
Old 04-16-2003
Question Concatenating Variables

FILE_DATE=$(date +"%Y%m%d_%H%M")_
FILE_PREFIX=${FILE_DATE}
echo $FILE_PREFIX
JS_LOG_DIR="E:\DecisionStream Jobs\Invoice Balance Fact Jobs"
echo $JS_LOG_DIR

--This is where the problem surfaces. The last line of this script does a rsh to an NT machine and one of the parameters is the variable $LOG_FILE_NM. I am attempting to pass an NT folder name to my NT job. However getting the backslash to work at the end of the variable JS_LOG_DIR is not easy! If I put a space after the backslash, it works - but I don't want a space after it.

LOG_FILE_NM="${JS_LOG_DIR}\${FILE_PREFIX}JS_FACT_INVOICE_BALANCES.log"
echo $LOG_FILE_NM

Here's the results:

20030416_1633_
E:\DecisionStream Jobs\Invoice Balance Fact Jobs
E:\DecisionStream Jobs\Invoice Balance Fact Jobs${FILE_PREFIX}JS_FACT_INVOICE_BALANCES.log


I need for this to look like:
E:\DecisionStream Jobs\Invoice Balance Fact Jobs\20030416_1633_JS_FACT_INVOICE_BALANCES.log
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

concatenating strings..

hey guys.. probably a simple question but i cant seem to find any info on it. i have a small array of strings, and i want to concatenate the contents of the array into one big string. any ideas on how i can do this? cheers. (2 Replies)
Discussion started by: jt_csv
2 Replies

2. Shell Programming and Scripting

Concatenating Different # of Variables

Hi, I'm quite new at unix and was wondering if anyone could help me with this. I have 2 arrays: eg. STAT=online, STAT=offline, STAT=online WWN=xxxx1, WWN=xxxx2, WWN=xxxx3 I got these information from a script using fcinfo hba-port that runs through a loop. Now, I want to store... (2 Replies)
Discussion started by: jake_won
2 Replies

3. Shell Programming and Scripting

Concatenating two files

HI I need to concatenate two files which are having headers. the result file should contain only the header from first file only and the header in second file have to be skipped. file1: name age sriram 23 file2 name age prabu 25 result file should be name age sriram 23 prabu ... (6 Replies)
Discussion started by: Sriramprabu
6 Replies

4. Red Hat

Concatenating variables

Hi all, I'm trying to do a very simple script, as you can see as follow: #!/bin/bash #Valorizzazione Token presenti nel file di properties var_path_weblogic="`cat weblogic.properties | grep "dir_wl" | /usr/xpg4/bin/awk '{print $3}'`" var_ip_address="`cat... (5 Replies)
Discussion started by: idro
5 Replies

5. Shell Programming and Scripting

need help in concatenating

Hi All , i`m writing a script , i stucked in middle . Script echo "Please Enter the INSTANCE name" read iName echo "The INSTANCE name is $iName" more /opt/IBMIHS*/conf/httpd.conf_"$iName" script end here i`m getting error as : Error /opt/IBMIHS*/conf/httpd.conf_w101:... (7 Replies)
Discussion started by: radha254
7 Replies

6. Shell Programming and Scripting

bash -- concatenating values from variables

Hi This is a simple one but I got a lost in translation when doing. What I want to do, given both variables in the example below, to get one value at the time from both variables, for example: 1:a 2:b etc... I need to get this in bash scripting code: varas="1 2 3 4" varbs="a b c d"... (4 Replies)
Discussion started by: ranmanh
4 Replies

7. Shell Programming and Scripting

Problem while concatenating variables in shell script

Hi folks, I am facing problem when I concat variables with the string. Value for 'JDBC_CLASSES' variable looks malformed (/classes12.zip2.0KAGES) But, my expected result for 'JDBC_CLASSES' is /opt/API-R111/PACKAGES/jdbc/ORACLE9.2.0/classes12.zip Am I missing anything here? My... (10 Replies)
Discussion started by: Adhil
10 Replies

8. UNIX for Dummies Questions & Answers

Concatenating

Hi, I have file called "3rdparty.dat" I want to concatenate current YYYYMMDD to it. Snd result should be like 3rdParty20111110.dat. How can i do this? Thanks in advance. (3 Replies)
Discussion started by: raj.shah.0609
3 Replies

9. Shell Programming and Scripting

Concatenating Output

Hello all The following line : df -h | awk '{print $5}'| head -2 |tail -1 gives me an output of '2.2G' How can I remove the 'G' so that I can use the 2.2 for further calculations ? (8 Replies)
Discussion started by: Junaid Subhani
8 Replies

10. UNIX for Beginners Questions & Answers

Concatenating two mutiline variables in a bash

Hi All, I am having a situation where am capturing results in two variables from an xml file. However, I am looking to print those two variables with pipe in between them and these variable are multi-line. This is how my 1st variable looks like: 20181225010 20190224010 20190224010... (8 Replies)
Discussion started by: svks1985
8 Replies
BPING(1)							  BP executables							  BPING(1)

NAME
bping - Send and receive Bundle Protocol echo bundles. SYNOPSIS
bping [-c count] [-i interval] [-p priority] [-q wait] [-r flags] [-t ttl] srcEID destEID [reporttoEID] DESCRIPTION
bping sends bundles from srcEID to destEID. If the destEID echoes the bundles back (for instance, it is a bpecho endpoint), bping will print the round-trip time. When complete, bping will print statistics before exiting. It is very similar to ping, except it works with the bundle protocol. bping terminates when one of the following happens: it receives the SIGINT signal (Ctrl+C), it receives responses to all of the bundles it sent, or it has sent all count of its bundles and waited wait seconds. EXIT STATUS
These exit statuses are taken from ping. 0 bping has terminated normally, and received responses to all the packets it sent. 1 bping has terminated normally, but it did not receive responses to all the packets it sent. 2 bping has terminated due to an error. Details should be noted in the ion.log log file. FILES
No configuration files are needed. ENVIRONMENT
No environment variables apply. DIAGNOSTICS
Diagnostic messages produced by bping are written to the ION log file ion.log and printed to standard error. Diagnostic messages that don't cause bping to terminate indicate a failure parsing an echo response bundle. This means that destEID isn't an echo endpoint: it's responding with some other bundle message of an unexpected format. Can't attach to BP. bpadmin has not yet initialized Bundle Protocol operations. Can't open own endpoint. Another application has already opened ownEndpointId. Terminate that application and rerun. bping bundle reception failed. BP system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun. No space for ZCO extent. ION system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun. Can't create ZCO. ION system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun. bping can't send echo bundle. BP system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun. BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu> SEE ALSO
bpecho(1), bptrace(1), bpadmin(1), bp(3), ping(8) perl v5.14.2 2012-05-25 BPING(1)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy