Sponsored Content
Top Forums Shell Programming and Scripting Help in creation of parameter file Post 302601679 by mac4rfree on Friday 24th of February 2012 08:27:33 AM
Old 02-24-2012
Thanks man.. That was real quick... ll let you know once i reach office. Smilie

---------- Post updated at 06:57 PM ---------- Previous update was at 05:23 PM ----------

Guys,

When i am running the awk command,

Code:
awk -F= 'NR>1{printf " "}{printf "-param "$1 "=\047" $NF "\047"}END{print RS}' ORS=" " input

But when i am running it in script, i am getting "\" along with single quotes(').

Actually it is passing it to some other program which is not able to recognize it..

It is passing like this.

Code:
echo $Parmfile
+ echo -param 'DbName='\''GMNGSRDB'\''' -param 'DbUser='\''NGSRALL'\''' -param 'DbPass='\''NGSRALL'\''' -param 'SrcLocation='\''/appl/data/VSTAR/global_daily/landing/GMKOREA'\''' -param 'SrcFile1='\''gmkoreacom_dly_sls_20120126165859.txt'\''' -param 'SrcFile2='\'''\''' -param 'IpLocation='\''/appl/data/VSTAR/global_daily/input/'\''GM' KOREA 'COMPANY'\'''\''' -param 'IpFile='\''gmkoreacom_dly_sls_20120126165859.txt'\''' -param 'OutLocation='\''/appl/data/VSTAR/global_daily/output'\''' -param 'BatchTrkId='\''22222'\''' -param 'BusinessUnit='\''GM' KOREA 'COMPANY'\''' -param 'Country='\''SOUTH' 'KOREA'\''' -param 'CurrSlsDate='\''2012-01-25'\''' -param 'PriorSlsDate='\''2010-01-25'\''' -param 'CurrSlsMth='\''2012-01-01'\''' -param 'CurrMnthStartSlsDate='\''2012-01-01'\''' -param 'PriorMnthStartSlsDate='\''2010-01-01'\''' -param 'CurrYrStartSlsDate='\''2012-01-01'\''' -param 'PriorYrStartSlsDate='\''2010-01-01'\''' -param 'OutFile1='\''Gbldly_D_Ods_DlySls_RefVal_010.GMKOREA.txt'\''' -param 'OutFile2='\''GblDly_D_Ods_DlySls_SalesFactFileCreation.GMKOREA.txt'\'''

Can somebody help me out here.

Cheers!!!!!!!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how do I make dynamic parameter names? Or get the value of a parameter evaluated twi

Say I write something like the following: var1=1 var2=2 for int in 1 2 do echo "\$var$int" done I want the output to be: 1 2 Instead I get something like: $var1 $var2 (2 Replies)
Discussion started by: Awanka
2 Replies

2. Linux

creation of a file

how to create a file with the same modification time as another file is having using the copy command? (1 Reply)
Discussion started by: infyanurag
1 Replies

3. Shell Programming and Scripting

file creation

hi guys Kindly see the below script #!/bin/bash if then # check to see if file notrouter exits or not if ! ls -l notrouter /root/joy/ >/dev/null then touch /root/joy/notrouter else echo "Entries already exist" fi else echo "Entries does not exist" fi here... (1 Reply)
Discussion started by: whizkidash
1 Replies

4. UNIX for Advanced & Expert Users

file creation

Hi, Is there any way to restrict directories with one type of file creation. regards. (8 Replies)
Discussion started by: guguli
8 Replies

5. Solaris

gzip a file and append creation date stamp to file

I want to gzip a file and append the creation date to the end of the file. How can I accomplish this task. Basically they are log files which need a creation date stamp appended to make sure they do not overwrite other log files. -jack (3 Replies)
Discussion started by: jacktravine
3 Replies

6. Shell Programming and Scripting

Help with creating a text file in perl with file creation date.

Hi, I am quite new to Perl scripting and i need to create a .TXT file using perl, with fields (A,B,C,D,E), and this text file should be named with current file creation date "XYZ_CCYYMMDD.TXT" (i.e.XYZ_2011042514:33 PM). Can anyone who has done this, please share their expertise on this... (5 Replies)
Discussion started by: msrahman
5 Replies

7. Shell Programming and Scripting

File creation

Hi I need to write a file with value value from Paramer which is passed from datastage. It should overwrite the file if already exists. Can anybody provide command for this? (1 Reply)
Discussion started by: cnrj
1 Replies

8. Shell Programming and Scripting

Command that takes one parameter and then searches for the passed in parameter

Hi I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/ Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies

9. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

10. Shell Programming and Scripting

How to print the specific part of the file name with file creation date?

Hello Folks, I have an requirement, where i need to get total count of the file based on creation date with there filename selected pattern. Filename: MobileProtocol.20171228T154200.157115.udr I want to get the count of files created on each day based on a pattern find. find . -type... (7 Replies)
Discussion started by: sadique.manzar
7 Replies
DL(3)							     Library Functions Manual							     DL(3)

NAME
DL - generate logging messages in C and C++ using a debugger SYNOPSIS
#include <DL.h> DL(format,...) DLG(guard,format,...) DLH(handler,format,...) DLP(param,format,...) DLGH(guard,handler,format,...) DLHP(handler,param,format,...) DLGHP(guard,handler,param,format,...) DESCRIPTION
The DL macro is used to print logging or debugging messages using a debugger. The nana(1) command generates a set of debugger commands which are then sourced into gdb(1) to implement the logging. If you don't run the executable under gdb(1) then no tracing will occur. The arguments are: format,... - a printf(3) style argument list containing the message guard - print only if the guard is true. handler - the code that does the printing. Default: fprintf param - a parameter to be passed off to the handler. Default: stdout See nana.info for details on configuring the behaviour. SEE ALSO
nana-clg(1), nana(1), nana(3), I(3), DI(3), L(3), DL(3), Q(3) and nana.info. The nana.info file is the primary documentation for this library. AUTHOR
Phil Maker <pjm@gnu.org> DL(3)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy