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
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 11:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy