Sponsored Content
Full Discussion: VAriable Question
Top Forums Shell Programming and Scripting VAriable Question Post 98281 by rjsha1 on Tuesday 7th of February 2006 06:52:25 AM
Old 02-07-2006
Here is the relevant section of the script :-

while read line
do
ICO=$(echo "${line}" | awk -F\| '{print $1}')

echo " ICO is $ICO" >> $REPORT
SQLFILE=`grep "^$ICO" $PARFILE | awk -F\| '{print $5}'`
echo "Sql file is $SQLFILE " >> $REPORT
MAILLIST=`grep "^$ICO" $PARFILE | awk -F\| '{print $4}'`
prvdate=`grep "^$ICO" $PARFILE | awk -F\| '{print $2}'`
echo "Logging onto Oracle Database" >> $REPORT
REPORTTXT=/tmp/$ICO3hr.dat

echo "Report file is $REPORTTXT" >> $REPORT



sqlplus -s $DIMENSION_SID @$SQLFILE >> $REPORT
if [ $? -ne 0 ]; then
subject="Three Hour Calls for `date +%x` Error Report"
mail_report $ERRORTXT

#end of driving loop
done < $PARFILE
echo "Process completed `date +%X`" >> $REPORT


The line in RED is the line I'm having trouble with
 

10 More Discussions You Might Find Interesting

1. Programming

variable initialize question

I have a question about C program for Unix: Do we have to intialize every variable before we use them in C? I thought we have to untill I found some programs are not intialize the variable before they were used. (2 Replies)
Discussion started by: whatisthis
2 Replies

2. Shell Programming and Scripting

Quick Variable Question

Hi, this is probably very easy but, how do I define a variable for more than one line. For example: var1='more than one line' when I call it, I want it to be exactly like this, don't want all the words on the same line. (10 Replies)
Discussion started by: starks
10 Replies

3. Shell Programming and Scripting

Question On Command in Variable

I have been working on a script that executes on a number of different operating systems. As a result I was trying to set a variable or perhaps variable array depending on the OS. I tried the following using eval and such but so far have not had any luck. Is there a way to do something like the... (4 Replies)
Discussion started by: scotbuff
4 Replies

4. UNIX for Dummies Questions & Answers

Another variable question, I think

So seems only way I'm going to learn is by asking. In the following and I can tell you that $ENV=384: grep $ENV $TSH/ftp/some.files | while read ELABEL EENV EFILE RFILE do if ]; then rm -ef ${RFILE}* else rm -ef ${EFILE}* fi done In the some.files : ... (2 Replies)
Discussion started by: NycUnxer
2 Replies

5. Shell Programming and Scripting

variable question

Hi i have two question 1. Yahoo! In above there are total three words 1.1. www 1.2. yahoo 1.3 com how can i take all three things in different variable, i dont understand that how to separate dot. it looks like that a=www b=yahoo c=com 2. i have variable xyz whois value... (7 Replies)
Discussion started by: learnbash
7 Replies

6. Shell Programming and Scripting

Changing a variable Question

I have a variable: $FILENAME = /XXXX/XXXX/XXXX/file.dat I want to set another variable that will give me this: $FILENAME2=filea.dat So basically i'm chopping up variable $FILENAME. Not sure cut will do this as i'm looking at different directories so the characther length may be... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

7. Infrastructure Monitoring

multiple variable question

This is the control File (snmplist.fl1) .1.3.6.1.4.1.789.1.5.4.1.2.3 = STRING: "/vol/vol0/" .1.3.6.1.4.1.789.1.5.4.1.2.5 = STRING: "/vol/SMP_sapdata/" .1.3.6.1.4.1.789.1.5.4.1.2.7 = STRING: "/vol/SMP_saplog/" .1.3.6.1.4.1.789.1.5.4.1.2.9 = STRING: "/vol/SRP_saplog/"... (6 Replies)
Discussion started by: riegersteve
6 Replies

8. Shell Programming and Scripting

Variable to command to Variable Question KSH

Hello, First post for Newbie as I am stumped. I need to get certain elements for a specific PID from the ps command. I am attempting to pass the value for the PID I want to retrieve the information for as a variable. When the following is run without using a variable, setting a specific PID,... (3 Replies)
Discussion started by: Coyote270WSM
3 Replies

9. Shell Programming and Scripting

Nawk variable question

Hi, I'm trying to replace a string with the contents of a file.. I found the below thread that shows how to do this but is there any way to use a variable as the file name in the nawk command?.. When I try I get an error saying while read groupsvar do ... (5 Replies)
Discussion started by: Jazmania
5 Replies

10. Shell Programming and Scripting

[QUESTION] echoing a variable

Hi...I am trying to make a script like this: mmc=123 echo "$mmc" > 123.txt The variable "mmc" has to be declared right on the beginning of the script, so when I open 123.txt, I get: 123 My question is, how can I "echo" '$mmc' into 123.txt, retaining the '$mmc' phrase? Which means when... (10 Replies)
Discussion started by: Ryuinferno
10 Replies
img-ico(n)																img-ico(n)

NAME
img-ico - Img, Windows Icon Format (ico) SYNOPSIS
package require Tk package require img::ico ?1.3? image create photo ?name? ?options? DESCRIPTION
The package img::ico is a sub-package of Img. It can be loaded as a part of the complete Img support, via package require Img, or on its own, via package require img::ico. Like all packages of Img it does not provide new commands, but extends the existing Tk command image so that it supports files containing raster images in the Windows Icon Format (ico). More specifically img::ico extends Tk's photo image type. The name of the new format handler is ico. This handler provides new additional configuration options. See section ICO OPTIONS for more detailed explanations. All of the above means that in a call like image create photo ?name? ?options? [1] Image data in ico format (options -data and -file) is detected automatically. [2] The format name ico is recognized by the option -format. In addition the value for the option is treated as list and may contain any of the special options listed in section ICO OPTIONS. SUPPORTED ICO TYPES
1-bit pixels: Black and White. 4-bit pixels: Grayscale or indexed. 8-bit pixels: True-color (RGB, each channel 8 bit). List of currently supported features: Type | Read | Write | | -file | -data | -file | -data | ---------------------------------------- 1-bit | Yes | Yes | No | No | 4-bit | Yes | Yes | No | No | 8-bit | Yes | Yes | Yes | Yes | ICO OPTIONS
The handler provides the following options: -verbose bool This option is supported for reading and writing. If set to true, additional information about the loaded/stored image is printed to stdout. Default is false. -index n This option is supported for reading only. Read the n'th image. The first image is at index 0. Default is 0. SEE ALSO
img-bmp, img-gif, img-ico, img-intro, img-jpeg, img-pcx, img-pixmap, img-png, img-ppm, img-ps, img-sgi, img-sun, img-tga, img-tiff, img- window, img-xbm, img-xpm KEYWORDS
ico, image handling, tk COPYRIGHT
Copyright (c) 1995-2003 Jan Nijtmans <nijtmans@users.sourceforge.com> Img 1.3 img-ico(n)
All times are GMT -4. The time now is 04:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy