How to solve this problem in shell script: unexpected end of file
HelloI need to connect to each of the databases listed in/etc/oratab and check what database is stopped (or mounted only) and what database is opened to accept the connection. However, the following shell script gives me this error message:
$>./check_is_db_runing.sh
. / check_is_db_runing.sh: line 39: syntax error: unexpected end of file
Could someone please help me solve this problem, why the code (line 29 to 32) does not work in the LOOP? It works without the LOOP.
Thanks in advance!
1 #! / bin/bash
2
3 LOGDIR = / oracle/data03/dbscripts
4 ORATABFILE = / etc/oratab
5
6 cat $ORATABFILE | read everything online
7 do
8-case $LINE in
9 \#*) ;; Comment # line in oratab
10 *)
11 ORACLE_SID ='echo $LINE | AWK - f: '{print $1}'-'
12 if ['$ORACLE_SID' = ' *']; then
13 # NULL SID - ignore
14 ORACLE_SID =""
continue 15
16 IFS
17
# 18 continue only if the last field corresponds to 'Y '.
19 if ["' echo $LINE | '] [' awk - f: '{print $NF}'-' "="Y"]; then
20 if [' echo $ORACLE_SID | cut b 1'! = '+']; then
21
22 ORACLE_HOME ='echo $LINE | AWK - f: '{print $2}'-'
23 PATH = $ORACLE_HOME/bin: / bin: / usr/bin: / etc
24 export ORACLE_HOME ORACLE_SID, PATH
LOGFILE = $25 LOGDIR/check_$ ORACLE_SID.log
26 touch $LOGFILE
#echo 27 $LOGFILE
28
$29 ORACLE_HOME/bin/sqlplus - s "/ as sysdba" < < EOF > $LOGFILE
30 select * from global_name;
exit 31
32 EOF
33
34 fi
35 fi
36;
ESAC 37
38 fact
This code works IE. produces newspapers with result sql - slightly modified to be executable:
#! / bin/bash
LOGDIR = / tmp
ORATABFILE = / etc/oratab
Cat $ORATABFILE | read everything online
do
case $LINE in
\#*) ;; Comment # line in oratab
*)
ORACLE_SID ='echo $LINE | AWK - f: '{print $1}'-'
If------[-z $ORACLE_SID-]; then
# NULL SID - ignore
ORACLE_SID =""
continue
# Only if the last field corresponds to 'Y '.
on the other
ORACLE_HOME ='echo $LINE | AWK - f: '{print $2}'-'
PATH = $ORACLE_HOME/bin: / bin: / usr/bin: / etc
export ORACLE_HOME ORACLE_SID, PATH
LOGFILE = $logdir/check_$ ORACLE_SID.log
Touch $LOGFILE
#echo $LOGFILE
$ORACLE_HOME/bin/sqlplus - s "/ as sysdba" < eof=""> $LOGFILE
Select * from global_name;
output
EXPRESSIONS OF FOLKLORE
FI
;;
ESAC
fact
Tags: Database
Similar Questions
-
you just bought LR6 DVD that I tried to install Adobe says that the installation is not possible because I am running Vista, even if I run Win7 Home Premium on my computer. Any ideas how to solve this problem?
Right click on the file Setup.exe and choose Properties option.
Then click on the Compatibility tab.
The value of the Windows 7 operating system and check.
See the link below:
-
Windows Vista window Defender error
Window Defender suddenly turned off & now shows error0x800106ba. How to solve this problem and get it to turn back?
Hello
read this information on the Defender:
· If you use microsoft security essentials avg avira mcafee norton etc they disable the vista version of windows defender by default
the basics of Microsoft security has its own version of windows defender
and other anti-virus programs use their own particular type of application to scan for spyware and malware
It of nothing to worry and is the default action, which is designed for them to do
If the above does not apply to your machine to read the information on the below link on how to disable the windows defender service in vista or make an autostart to enable
and here is the method to remove it from startup in vista
http://www.groovypost.com/HOWTO/Microsoft/Vista/remove-Windows-Defender-from-Vista-system-startup/
and this is how you would normally activate or disable windows defender in vista from within defenders of own and options tools
http://www.groovypost.com/HOWTO/Microsoft/Vista/disable-Windows-Defender-for-Microsoft-Vista/
and read this information to microsoft:
Error message when you run Windows Defender: «Error 0x800106ba»
http://support.Microsoft.com/kb/931849
and if you need to change startup programs read this information on the other methods of doing it without using defender
using msconfig read this tutorial:
How to use MSCONFIG in Windows Vista
Here's how to use MSCONFIG in Windows Vista to disable some unnecessary programs that load automatically at startup
http://netsquirrel.com/Msconfig/msconfig_vista.html
and also try this FREE program Autoruns:
This utility, which has a knowledge of auto-starting locations of any startup monitor, shows you what programs configured to run at system startup or login and that the entries in the order of processing windows. These programs include those in your startup folder, Run, RunOnce, and other registry keys. You can configure Autoruns to show other locations, including Explorer shell, toolbar extensions, helper objects to the browser, Winlogon notifications, auto and many start-up services more
-
My mac does not detect my hard drive after the upgrade. How to solve this problem?
My mac does not detect my hard drive after upgrading to Mac OS Sierra. How to solve this problem?
Please provide more detailed information. You can read write an effective communities of Apple support question. Maybe you could open disk utility and take a screen snap so that we can see what you see.
To post a screenshot
- Press command + shift + 4, that will change the cursor to the line of sight.
- Hold down the mouse button and the collimator allows you to select the part of the screen you want to capture.
- Release the mouse button and the image will be saved on your desktop.
- Click on the camera icon in the toolbar of the message forum Editor.
- Drag the image on the button select a file and click the Insert button.
-
My email is not working, no idea how to solve this problem?
I have two addresses - email [email protected] that does not work and the [email protected] who works there. I have no warnings or error messages, but I have not received emails for a week and it will not send emails. No idea how to solve this problem? Ildi
OK let see VAT present one bit at a time.
You should send messages using the tassiemoments server no bigpond. I think I might even be a technical violation of their service life... The provider is used to cover their bets as we ISP block port 25 connections home. I can attest to Telstra/Bigpond do not do that my mail server has worked well until the server has exploded at Christmas.
There are significant problems with the server and especially e-mail with no records among other things a DNS server. See here the page is slow to load because it tests the configuration of the server to tassiemoments.
The technical contact for the domain is JOANNE SMITH, WUNDOWIE, WA perhaps that is where you should direct your questions.
-
I can't play video of videomega.tv on mozilla, but when I use chrome, it works. On mozilla that it still can not be charged, said just because the server or network failed, or may format not supported. I have already updated to flash player and use html5 extension, without result. How to solve this problem? Thank you...
Thank you for your advice, but when I checked it on topic: config, the value is 2, so I don't change anything.
When I search another solution, accidentally, I installed engine (socialmedia.com) unwanted search so I am forced to reset mozilla. After that, the two problem solved all of a sudden!
Thanks for all your help and advice, it is very appreciated by me.
-
fingerprint sensor does not work for my iphone 16 6 GB pls help how to solve this problem?
I have iPhone 6 grey 16 GB of model space suddenly my fingerprint sensor no longer works.
When I try to set touch id always displays "failed please go back and try again".
Please guide how to solve this problem.
The warranty expired 3 months ago
See this support document to help solving the problems of contact ID. If all else fails, then make an appointment at the Genius Bar from the Apple Store supplier or Service Center authorized Apple closest to have the material examined. They will explain your options. Use touch on iPhone and iPad - Apple Support ID
-
My Macbook Air uses El Capitan 10.11.5. This operating system repeatedly freezes and the computer must be turned on / repeatedly. How to solve this problem?
Hello
Check if the hard disk needs repair.
Open the disk utility, located app in HD > Applications > utilities
Select Macintosh HD on the left then click the first aid tab, and then click Run.
-
Thunderbird I have installed shows a type of IMAP server and does not connect. My second machine has the same version of Thunderbird, but the server type is POP and works perfectly. The new machine does not allow me to change the type of IMAP POP server How to solve this problem?
-
iMovie crashes while I have it change. Any ideas on how to solve this problem?
iMovie crashes while I have it change. Any ideas on how to solve this problem? It may be a file corrupted in the movie, but I still wouldn't be able to delete it in iMovie because it crashes. I'm pretty well stuck unless one of you could help out. I would really appreciate it.
I tried also to edit a very old video and no crashes here so I don't know if it is a corrupt file. I don't know how to access.
If the failure occurs when you change a particular clip then remove it and re-import that clip. If it happens on several clips then I copy all the items in the timeline panel, create a new project and paste there the clips. If it persists in the new project try to open iMovie, hold down the command and option and delete the preferences.
-
Sent items from MS outlook do not appear in Thunderbird, but it works in the reverse (envoys since Thunderbird appears in Outlook). How to solve this problem?
I guess you have a pre existing account using the POP Protocol, that not only downloads the contents of the Inbox.
Hotmail, Live, MSN, Outlook dot com now support IMAP which is a synchronized messaging service, changes in one are reflected in the other.
File menu (alt + F) > New > existing e-mail account and add your account to the Thunderbird again. Make sure you have "account type selected IMAP and your all synchronized will.
If it's like my account, your IMAP e-mail account will come with a subfolder under the pop called deleted folder that contains all mail I have downloaded in the past years.
If you right-click your \new IMAP account in the folders pane on the right immediately after you create it and choose to subscribe you can unsubscribe from this folder if you don't see it
-
Updated macbook pro today for the latest version of el capitan and now will not start. Instead, I get the error message "your computer restarted due to a problem". Someone at - it suggestions on how to solve this problem?
It would be helpful to post what the screen says.
-Try to reset memory NVRAM/PRAM and SMC
MacIntel: Reset of the controller (SMC) system management
https://support.Apple.com/en-us/HT201295
Subject of memory NVRAM and PRAM
https://support.Apple.com/en-us/HT204063
-Try to start safe mode
OS x: what is Safe Boot, Safe Mode?
https://support.Apple.com/en-us/HT201262
-Start to recovery and repair the startup disk
OS X: on OS X Recovery - Apple Support
https://support.Apple.com/en-us/HT201314
-If it is repairable reinstall the OSX
How to reinstall OS X on your Mac - Apple Support
https://support.Apple.com/en-us/HT204904
-If you do not have a backup using disk utility to restore the internal drive to an external drive, so that you can try to recover the data.
-
Firefox remembers the story, but doesn't remember the closed tabs, sessions.
It happened after the Fox update to v. 19.0.2 on a single computer.In Options of Firefox is set to use Custom Settings For History, everything is checked except always use Private Browsing Mode. So I'm not in private browsing.
When I press to Undo Closed button nothing happens, & in the Manager session Save Session button is grayed. I tried to install other add-ons that remembers the tabs. tried to reinstall/disable these 2 modules. Did ' t help. On my 2nd computer I have same modules, same settings and they work normally. the 3rd closed computer undo works tabs also. How to solve this problem? I decided to ask before Firefox Reset...
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sync is a separate issue. It works, but quite often it connects me sync account. Then I can connect only using the recovery key password and long (option choice I have no device with me because he does not accept the key to pairing device).
Thanks for reading.
In case you use "clear history of Firefox closing:
- do not erase browsing history
- Tools > Options > privacy > Firefox will be: "Use the custom settings for history": [X] clear history of Firefox closing > settings
- https://support.Mozilla.org/KB/clear+recent+history
Note that compensation "Preferences of Site" clears all exceptions for cookies, images, windows pop up, installation of software and passwords.
-
When I run Mozilla Firefox I get the error message "ReferenceError: Globalstorage is not defined." How to solve this problem?
-VinayakGlobalStorage is no longer supported in the current Firefox (removed in Firefox 13), versions so the extension or Web site that uses it needs an update and use localStorage instead.
- bug 687579 - Remove support globalStorage
-
Hey everybody,
My pinion don't power down and can not pair on my mobile device. How to solve this problem?
Thank you
Bill
Hi Bill,
This should solve your problem!
1. Locate the reset button near the port of loading.
2. Insert gently a needle into the reset button access point and press the reset for 3 seconds button. Resetting the printer and everything already illuminated turn off the LED.
3. turn on the printer by pressing the power button until the white LED lights
Maybe you are looking for
-
Hello CD drive read do not.Correctly listed in my computer and Device Manager.Is not listed on the home page of the BIOS.Is listed on the Start Page, but isn't a sign + look, so pressing on enter, it does not extend. but the diskettes and hard disks
-
Screen time, works the time indicated from the beginning or the end of the block
When the selection of a block is both above the block of time limits screen, the start time or end, for example, I add a blue block under 19:00 made that led to the block will begin at 19:00 or 20:00 is really unclear. Thank you very much Tony
-
OfficeJet 6600: Noisy printer
After printing or copying, the printer makes a terrible screeching noise. I would like to know what parts I can oil (and how to access the parts.
-
basically I can't transfer files from iphone to pc as I used to. in my computer, there is no usb device when connected pc cannot see my iphone. I plugged the flash drive and it pops up immediately to usb works fine as wellI checked pc system informat
-
I need to convert a file wps as a PDF using my old compaq pasrio it seems imposible can anyone help
I created this book on my compaq pasario sr1303wm, this boy is 7 years old. Then, Unbeknowest to me, anyone who wants to look impossible. Open it, because I did it by using wps format. I put on a flash drive and walked over to my friends House who ha