Sponsored Content
Full Discussion: script returns prompt
Top Forums UNIX for Dummies Questions & Answers script returns prompt Post 41424 by kburrows on Monday 6th of October 2003 09:22:08 AM
Old 10-06-2003
script returns prompt

Hi,

I am trying to create a script that will loop through my oratab file and pull out the instance name.

Here is script:

for instance in $(cat /etc/oratab|egrep ':N|:Y'|grep -v \*|grep -v \#|cut -f1 -d':')
do
echo Instance $instance is in the oratab
echo $ORACLE_HOME
done

From what I can tell, it starts another process, why? Then it returns my prompt with no echo output to screen. Then I have to kill the process, now my output shows up after its killed.

What am I missing here?

Thanks,
Kathy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command prompt from within a script?

I am writing a menu script and one of the options is to access a Command Prompt and return to the menu via CTRL-D. I have tried using a loop and echoing the PS1 value, then using read to assign whatever is entered into a variable, then executing the value of that variable as a command using .... (1 Reply)
Discussion started by: sanitywonko
1 Replies

2. Shell Programming and Scripting

FIND returns different results in script

When I execute this line at the command prompt I get a different answer than when I run it in a script? Any ideas on how to resolve? I'm trying to find all files/dir in a directory except files that start with the word file. Once I get this command to work, I will add the "delete" part to the... (6 Replies)
Discussion started by: blt123
6 Replies

3. UNIX for Advanced & Expert Users

PPID differs in script and prompt

I tried several times to get answer to the below problem. Someone can please help me? $ cat p1.sh #!/bin/sh `./c1.sh &` while # indefinite loop do x=5; done $ cat c1.sh # sleep for 10 sec and exit #!/bin/sh sleep 10; Execute P1 as ./p1 & $ ps -eaf | grep c1... (1 Reply)
Discussion started by: alexalex1
1 Replies

4. AIX

Command behaves different in script and on prompt

$cat /tmp/tuxob.lst udi ***** jim 10 ant 19 ibm ***** $ input=`head -1 /tmp/tuxob.lst | awk '{print $NF}'` $ echo $input The output I am expecting is '*****'. But It is showing me the available files of current directory. When I run the command head -1 /tmp/tuxob.lst | awk '{print $NF} ... (3 Replies)
Discussion started by: panchpan
3 Replies

5. Shell Programming and Scripting

Shell Script to prompt customer for name etc

How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following: name, age, address, phone number, product, price range. Thanks (1 Reply)
Discussion started by: SQLScript
1 Replies

6. Shell Programming and Scripting

Execution of shell script returns error 127

Hi All, While running shell script i got following output. interpreter "usr/bin/ksh" not found sh: step1.sh: not found. ldnhpux | oracle >echo $? 127 - Running command "which ksh" retruns "usr/bin/ksh". - I found some information on web stating to remove extra carriage return chars,... (8 Replies)
Discussion started by: RuchirP
8 Replies

7. Shell Programming and Scripting

Python call to bash script returns empty string

Hi all, I need help figuring out why my script won't work when envoked from web interface. First off, I'm fairly new to Linux and Shell scripting so, my apologies for being ignorant! So I have a python script that I envoke through a web interface. This script envokes my shell script and... (8 Replies)
Discussion started by: arod291
8 Replies

8. Shell Programming and Scripting

Awk script returns nothing

HSLIST=$1 LFILE=$2 STRING=$3 awk 'BEGIN { while((getline < "'${HSLIST}'")>0) S FS="\n"; RS="}\n" } /servicestatus {/ && /service_description='${STRING}'/ { for(X in D) delete D; for(N=2; N<=NF; N++) { split($N, A, "="); (4 Replies)
Discussion started by: SkySmart
4 Replies

9. UNIX for Dummies Questions & Answers

Nohup not returns to the prompt

Hi i have a script and i ma running that via nohup and &. I am expecting that to return to the user prompt immediately. But it's not returning and returns only after i press ctrl+c. i am invoking the script as follow as : nohup ./script args & $ nohup: appending output to `nohup.out' ... (4 Replies)
Discussion started by: pandeesh
4 Replies

10. Solaris

Unable to move from rsc prompt to ok prompt

Hi, on sunfire v890 unable to move from rsc prompt to ok prompt, i have executed the command break. (9 Replies)
Discussion started by: manoj.solaris
9 Replies
ZGREP(1)						    BSD General Commands Manual 						  ZGREP(1)

NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...] zegrep [grep-flags] [--] pattern [file ...] zfgrep [grep-flags] [--] pattern [file ...] DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1). The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern argument. zegrep calls egrep(1), while zfgrep calls fgrep(1). EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0. SEE ALSO
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1) AUTHORS
Thomas Klausner <wiz@NetBSD.org> BSD
December 28, 2003 BSD
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy