Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Help for resolving Unexpected EOF while assigning value to variable Post 303007386 by usman_oracle on Thursday 16th of November 2017 02:51:07 AM
Old 11-16-2017
Code:
#!/bin/sh
. /opt/ora/oracle/db/tech_st/11.2.3/PROD_darwin.env
#sqlplus -s "apps/apps" << EOF
no=$(sqlplus -s apps/apps<<EOF
set heading off
set feedback off
Select 
pt.user_concurrent_program_name report_name , OUTFILE_NAME report_path 
FROm 
apps.fnd_concurrent_programs_tl pt, 
apps.fnd_concurrent_requests f 
where 
pt.concurrent_program_id = f.concurrent_program_id 
and pt.application_id = f.program_application_id 
and f.RESPONSIBILITY_ID = 52431 
and trunc(f.request_date) = trunc(sysdate);
exit
EOF
)
report_name=`echo $no | awk '{print $report_name}'`
report_path=`echo $no | awk '{print $report_path}'`
echo $report_path
echo $report_name
scp  $report_path /opt/report

now variables are showing the assigned values of Report_name and report_path
i am copying the report output file to opt/report
but its showing error. below is the output of the above script

Code:
[oracle@darwin ~]$ . /home/oracle/scripts/u1.sh
Daily Yarn Clearance Summary Report (NCML / ESML) -Customized /opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16737993.out Lab Test - Customized /opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16737995.out
Daily Yarn Clearance Summary Report (NCML / ESML) -Customized /opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16737993.out Lab Test - Customized /opt/ora/oracle/inst/apps/PROD_darwin/logs/appl/conc/out/o16737995.out
cp: cannot stat `Daily': No such file or directory
cp: cannot stat `Yarn': No such file or directory
cp: cannot stat `Clearance': No such file or directory
cp: cannot stat `Summary': No such file or directory
cp: cannot stat `Report': No such file or directory
cp: cannot stat `(NCML': No such file or directory
cp: omitting directory `/'
cp: cannot stat `ESML)': No such file or directory
cp: invalid option -- C
Try `cp --help' for more information.
cp: cannot stat `Lab': No such file or directory
cp: cannot stat `Test': No such file or directory
cp: cannot stat `-': No such file or directory
cp: cannot stat `Customized': No such file or directory



Moderator's Comments:
Mod Comment Seriously (after two infractions): Please use CODE tags for code and data as required by forum rules!

Last edited by RudiC; 11-16-2017 at 05:06 AM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unexpected eof error

Hi, I am newbie and am just trying to connect to oracle from shell script ,,,but I am getting the following error ./prog.sh: line 20: syntax error: unexpected end of file The scripts is : #!/bin/bash O=$IFS; IFS=","; while read a b c d do echo $c ... (6 Replies)
Discussion started by: thana
6 Replies

2. UNIX for Advanced & Expert Users

unexpected EOF

I ran the following scripts and everytime i get the errot as follows Line 54: unexpected EOF while looking for matching ',' line 57 syntex error unexpected end of file#!/bin/ksh set -x BKUP_DIR=/u03/backups/abu/nightly_backup LOG_FILE=/u03/backups/abu/backup.log ORACLE_HOME=... (9 Replies)
Discussion started by: manna
9 Replies

3. Shell Programming and Scripting

Unexpected EOF while looking for matching `"'

Hi everyone, I am trying to search for a string in a file that is partly made up of a variable. Here's the code: echo "parentCategory = $parentCategory" echo "parentCategoryFormatted = $parentCategoryFormatted" numUrlsFoundInParentCategory=`grep -c "<Topic r:id=\"Top\/World\/Français\/"... (2 Replies)
Discussion started by: BlueberryPickle
2 Replies

4. UNIX for Dummies Questions & Answers

unexpected EOF

hello everyone...im having this problem with unexpected EOF with line 85 which is..i cant see whats wrong with it..can any1 plz help me out. read -p "$p1 please enter the number of tries you wish to have:" lifeline function main() { guessnum=0 read -p "Please enter if its sinle player game... (1 Reply)
Discussion started by: Freakhan
1 Replies

5. Shell Programming and Scripting

Stuck with Unexpected EOF

Hi, i have a script as below. i'm using sun solaris 10. Script : #! /bin/sh load() { find /stage_area/loadfiles/telsims/test/ -type f -name "*$1" -print > /tmp/testfile.txt fc=`cat /tmp/testfile.txt | wc -l | sed 's/ //g'` if ; then echo " Files Not Avaliable" exit else... (12 Replies)
Discussion started by: apple2685
12 Replies

6. Shell Programming and Scripting

unexpected EOF : BASH

i'm writing a bash script that uploads a file to my server but it keeps saying unexpected EOF... i cannot see the problem with it, and it worked before i edited the script to work on my ipod touch as well. Here is the troublsome code... if ; then tar -czf "file(Mac).tar.gz" "/folder" >... (11 Replies)
Discussion started by: DuskFall
11 Replies

7. UNIX for Dummies Questions & Answers

Unexpected EOF in .profile

When opening a new window under Terminal, got that message: Last login: Sun Oct 30 10:35:12 on ttys000 -bash: /Users/MyName/.profile: line 47: syntax error: unexpected end of file I tried several clues like using BBedit or emacs to get rid of it, nothing does. Maybe shell commands cut or... (1 Reply)
Discussion started by: shub22
1 Replies

8. Shell Programming and Scripting

eof unexpected while looking[...]

Hello I use opensuse build service to build packages (oh surprise !) I have integrate a command in a spec whose worked and now this exit with: unexpected EOF while looking for matching `"' Command: if \.").mk ]; then ln -s $(pwd)/mozilla/security/coreconf/Linux2.6.mk \ ... (5 Replies)
Discussion started by: posophe
5 Replies

9. Shell Programming and Scripting

Unexpected EOF while looking for matching `"'

I have a piece of Linux script. It tells me some syntax error. I couldn't find it. Please help me to identify them. Thanks. The code looks like this: export ORACLE_SID=MYDB export SPW=`cat /opt/oracle/scripts/.sys_pw_$ORACLE_SID` export check_arch=`sqlplus -s << EOF / as sysdba... (7 Replies)
Discussion started by: duke0001
7 Replies

10. Shell Programming and Scripting

Unexpected EOF while loooking for matching '"

Hi everyone, I'm really new in shell scripting and having trouble resolving this error. Can someone please tell me why I'm getting these errors? Error Message: ./test.sh: line 50: unexpected EOF while looking for matching `'' ./test.sh: line 53: syntax error: unexpected end of file ... (4 Replies)
Discussion started by: simonirang
4 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 10:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy