Issue with use of Configuration file instead of hardcoded values inside the script
Hi,
My code works perfectly fine.
But,
and
i may need to change the values in future. so am keeping them in a separate configuration file like
in the script, i use a package use et_config and Et_Config_Init()
I call them inside the script like
The issue here is, when i use those values directly in the script, it takes the multiplied value as 1 * 1 * 60 =60 but when i get them from the configuration file, it remains as 1 * 1 * 60 only as such , so i am not getting the result expected.
Is there any function that can do this?
The configuration file is mandatory. How can this be achieved?
Hi,
I would like to write a Korn shell script which will remove files older than a certain date. In my script, it will read a configuration file with the following entries:
# <directory> <filename wildcard>
#
/home/philip/log *.log
/home/philip/log1 delete-me*.log
The... (1 Reply)
I have to find out the file system location of the script file inside script. for example a script "abc.sh" placed anywhere in the file system when executed shold tell by itself the location of it.
example
#pwd
/
#./abc
this is /
#cd /root
#./abc
this is /root
#cd /
#/root/abc
this... (10 Replies)
hello gurus,
When i run the command on shell
webalizer -p -n mydomain.com -c /path/to/my/log/webalizer.conf
it works fine and it creates stats for the given mydomain.com in the target output directory
but when i put it in a script same command and parameters but it goes weird and it... (0 Replies)
Hi,
I have many perl scripts in single server, i am new to perl,
suggestions are appreciated.
connection string is hardcoded in all perl scripts
i need to make change the all perl scripts and there should be only one config file available in that server.
destination database is mysql... (3 Replies)
Dear All,
i am new to shell scripting, I am working on embedded system based on linux.I am supposed to the read the configuration file and edit another file.
presently I would like to read from the configuration file.It would be having values file one below.
There is chance of entering... (6 Replies)
Hi Guys
I am using one configuration file for reading some time out values.The format of the file is
A.Type = Number
A.Val = 2000
B.Type = Number
B.Val = 4000
Now my requirement is I need to write a shell script in Solaris where i need to increase these timeout values by 10 times of... (3 Replies)
Hi,
I have initailized a varaible EBID as typeset Long EBID=0
i am calculating value of EBID using certian formula as below:
(( CURR_EBID= ($BANDINDEX << 27) | ($CURR_FREQ << 16) | ($CURR_CELLID << 4) | $CURR_SECTOR_VALUE ))
return $CURR_EBID
The output is as below:
+ (( CURR_EBID=... (6 Replies)
Hi,
Taking sum up all values inside the file by using the below command:
paste -sd+ filenmae | bc
Getting some error like "0705-001: building space exceeded on line1 stdin"
The original data looks like
SPACE SPACE SPACE 0.123 JOBNAME1
SPACE SPACE 20.325 JOBNAME2
SPACE SPACE... (2 Replies)
Hi ,
DIR1 has only one file with .txt extension , trying to get the size of that file using the following script
#!/bin/ksh
foldr_1="/etc/DIR1"
#echo "$foldr_1"
sze_fdr1=$(ls -ltr foldr_1/*.txt |awk '{ print $5 }')
echo "$sze_fdr1"
After executing the above script getting... (1 Reply)
Good day guys,
I'm having trouble in creating a logic when it comes to replacing the values inside a file.
I tried using sed command but it just doesn't work the way I want it to be.
Here is what I'm trying to achieve.
If my input file contains the values below.
NAME++GUEST1 ++GUESS2++... (3 Replies)
Discussion started by: asdfghjkl
3 Replies
LEARN ABOUT OPENSOLARIS
ppmtosixel
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)